On 7/1/2006 10:17 AM, kevin johnston wrote the following and I, Dennis Marks, have replied at the bottom:
As far as I can tell, from the documentation and my own experiments, OOo does not save "backreferences" from the search pattern to use in the replacement pattern.

Even in a Regular Expression *search*, the *replacement* expression is not a regular expression, it's a simple text string.

I've been meaning to file this as a Request For Enhancement for ages. But I haven't.

Dennis Marks wrote:

I'm trying to to a find and replace using regular expressions. I have sentences in the format "nn:nn xxxxxxxxx". I want to replace it with "nn:nn tabcharacter xxxxxxxx". Example "1:34 Now is the time" replace with "1:34 tabcharacter Now is the time".

I use "([0-9]+:[0-9]+ )" in the find and "\1\t" in the replace.

The result is "\1 tabcharacter xxxxxxxx".

\1 should refer to the parenthesis info in the find but it does not. Why?



Thank you. Removing parenthesis and changing \1 to & worked.

--
Dennis M. Marks

Disclaimer: The above is my opinion. I do not guarantee it. Be sure to back up any files involved and use at your own risk. Batteries not included. Not for internal use. Don't run with knives.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to