Apache OpenOffice (AOO) Bugzilla – Issue 107389
regular expression ^ by itself does not work
Last modified: 2013-11-13 15:51:06 UTC
I am new at bug reporting for OOo, so I might have this filed in the wrong place. This bug was originally reported downstream in LaunchPad at https://bugs.launchpad.net/openoffice/+bug/465309 In Find&Replace, a regular expression of "^" (without the quotes) never matches anything. It should match the front of every line. For example, if you want to comment out a block of code in the Basic macro editor, it should be possible to Find ^ in a selection and replace it with "rem " and have "rem " inserted at the front of all the selected lines. But ^ alone does not work, and never matches any lines. The use of of ^ alone to match the start of lines (and, similarly $ for end-of-lines) has been a fundamental feature of regular expressions in computer systems since they were first widely used in 1970s Unix. OO should not deviate.
Moving this to the Word Processor component.
Setting the sub-component.
Confirmed on AOO 3.4.1 Note that ^ does work in combination with other patterns, e.g., ^.* But by itself it is not working.
Confirmed on Win7 OO 4.0.1: If using just "^" beginning of line not found, if used with any other character(ex:"^j"), line beginning with "j" will be found. To clarify, functionality seems to work correctly with "$"