need to add slashes

Fairlight fairlite at fairlite.com
Thu May 25 19:50:52 PDT 2006


When asked his whereabouts on Thu, May 25, 2006 at 08:49:38PM -0400,
Kenneth Brody took the fifth, drank it, and then slurred:
> 
> To add backslashes before apostrophes:
> 
>     { {!" "!}@ | <"\">"'" | * }

Okay, maybe I'm used to regular expressions and got in the wrong mindset,
but what I tried testing earlier was:

[ * ]<"\">"'"[ * ]

Why doesn't that work?  :)

Allow 0 or more characters, insert a backslash before any apostrophy,
followed by zero or more characters.

Why's it break on the "i" in "Mike's"?

At least I had part of it right.  I just know somehow that RE thinking is
screwing me up here.  But it's so much simpler:   s/'/\\'/g

Done.  :)

Okay, but back to my failing edit.  Why?

mark->



More information about the Filepro-list mailing list