Apache OpenOffice (AOO) Bugzilla – Issue 36405
Regular express found in find not expanded in replace
Last modified: 2013-08-07 15:12:27 UTC
A regular expression is found correctly, but it is not expanded in replace. Illustration: the <> brackets below hold the text in the boxes, "regular expression" checked. Search for: <??, '0?> Replace: <> Finds cell with <30-Apr 30, '02-2002> Actually replaced with <30-Apr 302-2002> Viz., only the characters explicitly input <, '> are replaced, with the metacharacter ? appearing to be unexpanded. I was expecting to get <30-Apr-2002> This was annoying as I wanted to replace dates such as <Apr 30, '02> <May 31, '02> by <30-Apr-2002> <31-May-2002> so that they would be recognised as dates by Calc. This needs a standard grouping reversal, but that is not possible in ooO as replace does understand groups. So I did search and replaces manually to get <30-Apr 30, '02-2002> etc, only to be thwarted again by a fairly brain-dead RegEx engine that can understand what 'find' has located. I looked at other RE issues and most are only listed as "enhancements". The almost complete disconnect between the find and replace syntaxes (not being able to use groups, which is attributed to the original specification apparently) is to my mind a major weakness. I saw a comment that better reg exes would not reach 2.0. That is a disappointment.
Hi Bettina, this seems to be an ehancement request. Please have a look. Frank
My error, Not an issue Rereading 'help' on regular expressions a day later shows the expression I should have used needed dots not ? to represent single characters.
Ok, so I close this one as wfm. Frank
closed wfm.