Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Matching a backslash-escaped character
April 2, 2007, 5:19 pm
rate this thread
char. It shouldn't be this difficult, so obviously I'm doing
something dumb or not doing what I think I'm doing.
I want to transform, for example
for use in a mysql query. Unless I'm misunderstanding something about
the syntax, this
should do the job. But it doesn't. What I get is a complaint that
there's no closing square bracket, which doesn't make sense unless
it's parsing the string in a funny way.
If I add a third backslash,
the complaint goes away, but the transform I get is
which doesn't make sense to me at all.
So I'd greatly appreciate being told what the heck I'm doing wrong.
Re: Matching a backslash-escaped character
In case it didn't work out (it's amazing, how easily we think something
works, while in fact it doesn't, when we are tired :P)... Matching a
""-delimited string that may contain escape sequences (including \") is:
And btw.: Next time you find the answer yourself *after* posting the
question: Please share it, as the newsgroups are also indexed by searching
index and therefor threads might be found by others just looking for what
you were doing.