incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 119437] New: Inconsistency with RegExp and references
Date Mon, 28 May 2012 07:57:14 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119437

          Priority: P3
            Bug ID: 119437
          Assignee: ooo-issues@incubator.apache.org
           Summary: Inconsistency with RegExp and references
          Severity: normal
        Issue Type: DEFECT
    Classification: Application
                OS: All
          Reporter: rgb-es@apache.org
          Hardware: PC
            Status: CONFIRMED
           Version: AOO340
         Component: editing
           Product: word processor

On Writer, write this text

One repeated repeated wordword

(notice the second duplication *without* a space between words) Now use this
regular expression

\b(.+) *\1\b

Duplicated words are find without problems, but if on "Replace by" you write

$1

you'll get

One repeated $1

i.e., the replace works Ok on first duplicated word, but not on the second. 

Now, on the original text try this regular expression

\b(\w+) *\1\b

i.e., replace the dot with a "word element" \w. With $1 on "Replace by" you'll
obtain 

One $1 $1

i.e., the replace will fail on both duplicated words.

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

Mime
View raw message