New regex engine is great, but backreferences in Search field must be written with backslash (\1, \2 etc.), while backreferences in Replace field must be written with dollar sign ($1, $2 etc.). This is inconsistent and brings confusion to user. To see what I mean: 1. Create new Writer document. Write "test test" 2. Open search and replace dialog, check "Regular expression" 3. In Search enter: \b(\w+)\b in replace: $1ing press "Replace all". You should get "testing testing" 4. In Search enter: \b(\w+)\b\s*$1 in replace $1 press "Replace all" Error will occur that match could not be found. 5. In Search enter \b(\w+)\b\s*\1 in replace $1 press "Replace all" duplicated string will be deleted. tested under LO 4.0.4, Debian testing amd64.
After reading through ICU regex list[0] again, carefully, I now know that this is intended. I still think that this is confusing and should be changed, but this is pretty much ICU design decision, so pretty much NOTOURBUG. [0] http://userguide.icu-project.org/strings/regexp