I did indeed mean the string to be as it was; it's actually text that I'm getting from an email that I want to parse. The part where I said "Ugh" was specifically because I'm not a fan of 'eval'ing arbitrary text; that's a a really, really bad idea. :)
There are lots of ways to solve "the problem" (which isn't really a problem; I mean, two substitutions and it's done.) I was just curious to see if, given that original string - one with single backslashes in it - a capture mechanism could be constructed along the lines of what I was trying to do. At the moment, it looks like the answer is 'no' - but I hope that someone here will prove me wrong.
-- Education is not the filling of a pail, but the lighting of a fire. -- W. B. Yeats
In reply to Re^2: Regexes and backslashes
by oko1
in thread Regexes and backslashes
by oko1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |