Issue 107389 - regular expression ^ by itself does not work
Summary: regular expression ^ by itself does not work
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 3.1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2009-12-02 17:14 UTC by weathergod
Modified: 2013-11-13 15:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 3.4.1
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description weathergod 2009-12-02 17:14:00 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

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.
Comment 1 weathergod 2009-12-07 18:43:44 UTC
Moving this to the Word Processor component.
Comment 2 weathergod 2009-12-07 18:44:34 UTC
Setting the sub-component.
Comment 3 Rob Weir 2013-02-09 04:05:55 UTC
Confirmed on AOO 3.4.1

Note that ^ does work in combination with other patterns, e.g., ^.*

But by itself it is not working.
Comment 4 chopf 2013-11-13 15:51:06 UTC
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 "$"