Just in case people don't know, in emacs you can
use ^Q to quote special characters. This works
in the emacs replace command also.
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, August 04, 1999 12:56 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Search and Replace....
>
>
> hi matthew...
>
> I usually do:
>
> :1,$s/foo/bar/g - replace foo in the whole file..
>
> for your stuff...I'd try:
> :1,$s/\^/\\1/g
>
> - 1,$ do it on the whole file..
>
> - g do it multiple times in the line
>
> - need to escape your leading ^ since you are not looking for the
> first few characters ( column 1 ) of the line
>
> - need to escape \ in \1 if it didn't work before
>
> my 30 second answer w/ explanation
>
> have fun
> alvin
>
> > I have a problem using search and replace in a text editor. I have a
> > txt file that has several ^ characters and I'm trying to replace all ^
> > characters with \1 .
> >
> > I've tried using emacs keys ; escape x replace-string, but no luck.
> > I've even tried vi command :%s/^/\1/g. but no luck there either. I
> > think with this command :%s/^/\1/g the \1 messes up the command.
> >
> > If anyone could help it would be greatly appreciated thanks
> >
> > Matt
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> > the body of a message to [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]