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

          Issue ID: 126049
        Issue Type: DEFECT
           Summary: Regex Search/Replace in Calc does not support
                    lookbehinds/lookaheads
           Product: Calc
           Version: 4.1.1
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: editing
          Assignee: issues@openoffice.apache.org
          Reporter: je...@kindwall.me

I have a bunch of strings that look something like this stored in several cells
in a spreadsheet:
"Thing-1!!!/Thing-2!!!/Thing-3/Thing-4!!!"

I want to make sure every numbered Thing ends with three exclamation marks, and
as you can see above, they are missing from Thing-3. So I attempt a regex
Search/Replace with a lookbehind like this:
Search for
(?<=-\d)/
Replace with
!!!/

So that should find all forward slashes that are immediately preceded by a
hyphen and a single digit, then replace only the slash with three exclamation
marks and another slash.

Tried this exact scenario in OpenOffice Writer and it worked. However using the
exact same search string and regex in OpenOffice Calc, I get "Search key not
found."

Similarly, if I try to search the same string with this regex:
Thi(?=ng)

It matches the first three letters of each "Thing" in Writer, but in Calc I
again get "Search key not found."

-- 
You are receiving this mail because:
You are the assignee for the issue.
You are watching all issue changes.

Reply via email to