Apache OpenOffice (AOO) Bugzilla – Issue 15359
regexes not matching case properly
Last modified: 2013-08-07 14:44:28 UTC
Using 1.1 Beta2, a regex search for "\. [a-z]" finds all full stops, even when they are followed by a space and an upper case letter. The same is true of a search for "\. [:lower:]?". Expected behaviour: this should find only lower case letters. Additinal note: according to the help, yu should also tick the "case sensitive" checkbox. This doesn't help. But it is also, surely, a mistake when using regexes. The two that have failed are case sensitive in themselves. [a-z] should not match any upper case letters whether or not a case sensitive flasg is set.
HI->SBA: Search is your area.
I tried the OO.org 645m4 build (-> OO.org 1.1 RC candidate), and all looks good: 1. About finding the space: When you use "\. [a-z]" as search string, you will find the "Dot-Space-Letter" combinations because the space is within your search string. with "\.[a-z]" you will find only the "words that begin with a dot". 2. About cases: Of course, one can enter [a-z|A-Z] if the match case box shall be ignored while using Regular Expressions, but using the box simply eases the search. Therefore [a-z] as well as [A-Z] finds ALL letters in case the match case box is unchecked. -> Set to fixed as it works as defined now.
Closed.
Stefan, I can see that this is a matter of temperament, but I do think that the behaviour as defined is wrong, because defining case is part of the way one learns to use regexes. [a-z] and [A-Z] are different in any flavour of Unix I have ever used. Often, this is bloody irritating. But it is what people are used to. So it feel stragne, and could easily be missed, to have to press a case-sensitive checkbox as well as compose a case-sensitive regex. Might I suggest as a compromise that we insert a sentence aobut this into the help?