https://issues.apache.org/ooo/show_bug.cgi?id=121633

            Bug ID: 121633
        Issue Type: DEFECT
           Summary: regular expressions fail unless "match case" is also
                    ON
    Classification: Application
           Product: word processor
           Version: AOO 3.4.1
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ui
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Reply via email to