Apache OpenOffice (AOO) Bugzilla – Issue 121633
some regular expressions fail unless "match case" is also ON
Last modified: 2017-05-20 10:45:09 UTC
The new ICU regex engine requires that letter case is significant in the pattern: \S is different from \s ("non-space" and "space") \B is different from \b ("non-boundary" and "boundary") \p{Uppercase} is valid, \p{uppercase} is not The "match case" option in Writer interferes with these patterns. In Writer: File > New (type)dt(then)F3 -> dummy text paragraph Edit > Find & Replace Search for: \S Match case: OFF Options/regular expression: ON Click: Find Note that the pattern matches only spaces, where it should match non-space characters. Change Match case: ON Now the pattern works, matching non-space characters. It seems that the "Match case" option must be on in order to preserve case in the pattern. This is not correct, breaking some searches and giving wrong results in others. The "match case" option should not affect the pattern itself, only how the match is carried out.
Confirming on AOO 3.4.1 and on todays AOO trunk version.
"hdu" committed SVN revision 1436862 into trunk: #i121633# fix search for upper-case character classes in ignore-case regular ...
Thanks for catching this1 Please check with one of the next nightly builds at http://ci.apache.org/projects/openoffice/ when they successfully build a revision >=1436862.
"hdu" committed SVN revision 1436886 into trunk: #i121633# fix ignore-case problem caused by i18nsearch API mess
Tested AOO350m1(Build:9611) - Rev. 1442201 2013-02-05_04:29:57-Rev.1442466 on Fedora Linux 17 Looks good; problem solved. All my tests I listed above seem to work as expected now. Thanks so much for looking into this!
I don't know what's happened but this problem is NOT fixed in AOO 4.0 release. Testing AOO400m3(Build:9702) - Rev. 1503704 2013-07-16 11:18:40 (Tue, 16 Jul 2013) - Linux i686 Edit > Find & Replace Search for: \Sa finds only a's preceeded by a space--the pattern calls for non-space. Tick "Match case" and it works properly. Maybe the relevant patch did failed to go into the AOO 4 line? I've changed the status to "REOPENED"; I hope that's right.
Yes, the fix for bug 121880 unfortunately reintroduced this problem again.
Seems to me that any further fix should include a test case so it cannot happen yet again.
I'm still seeing this problem in dev builds of 4.1 AOO410m14(Build:9760) - Rev. 1573613 2014-03-04_02:13:02-Rev.1573839
Reset the assignee to the default "issues@openoffice.apache.org".