On Mon, 2006-02-06 at 18:20 -0600, Arctic Fidelity wrote:
> On Mon, 06 Feb 2006 16:48:05 -0600, G. Roderick Singleton  
> <[EMAIL PROTECTED]> wrote:
> 
> > On Mon, 06 Feb 2006 15:44:06 -0600, Arctic Fidelity wrote:
> >
> >> I'm trying to do a search and replace using regular expressions on a
> >> single selection of cells in OpenOffice.Org 2.0.1. It's not working.  
> >> :-P I
> >> am working on tab-delimited files, and am trying to insert a string into
> >> the beginning of each of the cells. In all the other programs I use,  
> >> this
> >> is done by using:
> >>
> >> Search: ^
> >> Replace: string
> >>
> >> But this claims that there were no results found.
> >>
> >> Instead, I thought I could do this:
> >>
> >> Search: ^(.)
> >> Replace: String \1
> >
> > You should be able to do so.

Well, it does in most other implementations of REs, but in OOo it's a
little different/strange. I had to read the help page on REs very
carefully to realise that () and \1 etc are used only in the search
term, and \1 is not used in the replace term. E.g. () and \n are used
like this: '(A)BC\1\1\1' will match 'ABCAAA'.

To long-time RE hackers this is a little unexpected. What you need is
this:

Search: ^.
Replace: String &

I don't know what you do if you want to carry more than one sub-string
match over to your replace string.


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

Reply via email to