Issue 15359 - regexes not matching case properly
Summary: regexes not matching case properly
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: stefan.baltzer
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-06 11:06 UTC by ingenstans
Modified: 2013-08-07 14:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ingenstans 2003-06-06 11:06:43 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.
Comment 1 h.ilter 2003-06-06 13:53:17 UTC
HI->SBA: Search is your area.
Comment 2 stefan.baltzer 2003-06-16 14:03:34 UTC
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.
Comment 3 stefan.baltzer 2003-06-16 14:15:52 UTC
Closed.
Comment 4 ingenstans 2003-06-16 14:29:55 UTC
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?