Issue 120598 - Apache Find/Replace Flaw in OpenOffice 3.4.0
Apache Find/Replace Flaw in OpenOffice 3.4.0
Status: CLOSED FIXED
Product: Writer
Classification: Application
Component: editing
3.4.0
All All
: P3 normal (vote)
: 4.0.0
Assigned To: hdu@apache.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 01:17 UTC by ldgolds33
Modified: 2012-11-14 08:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: 3.4.1
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ldgolds33 2012-08-17 01:17:04 UTC
In Apache OpenOffice 3.4.0, if you do a find/replace of standard left quote "\< with “, the quote is replaced on BOTH sides, contrary to the Regular Expressions instructions, it should only be placed on the left side. This but is not present in previous versions.
Comment 1 Oliver-Rainer Wittmann 2012-08-17 07:21:24 UTC
@Herbert: may be you want to have a look.
Comment 2 zong dong jun 2012-09-07 09:30:59 UTC
confirm
Comment 3 SVN Robot 2012-09-07 13:28:19 UTC
"hdu" committed SVN revision 1382018 into trunk:
#i120598# better emulation of regexp word-start and word-end operatorsThe emu...
Comment 4 hdu@apache.org 2012-09-07 13:46:43 UTC
The new ICU-regexp engine has many benefits such as much improved unicode support and support back references, non-greed matches, look-ahead, look-behind, match count limits, graphemes, atomic matches, non-capturing matches, possessive matches etc. It didn't directly support the GRE-only \< and \> word-break operators though, so they were emulated by plain word-break operators.

The fix just commited improves the emulation considerably using the newer engines look-around features by emulating the
- word-start operator as \b(?=\w)
- word-end operator as (?<=\w)\b

Until this gets into the next release the workaround for the issue reporter is to replace the "\< with "\b(?=\w) and the \>" with (?<=\w)\b
Comment 5 hdu@apache.org 2012-09-07 14:05:36 UTC
correction to the comment above. The last part was missing a " so it should read:
... and the \>" with (?<=\w)\b"
Comment 6 binguo 2012-11-14 08:55:33 UTC
Verified on Aoo_Trunk_20121109.1800 rev 1407366
pass
Comment 7 binguo 2012-11-14 08:55:54 UTC
close it.