Extract them from what? Without more context, we can't really help... So far a GREEDY pcre with quote on each end fits all the inputs. And *WHY* do you have so many backslashes? Whatever is causing that (MagicQuotes, cough, cough) is your REAL problem. Fix the problem, not the symptom. On Sat, March 29, 2008 6:16 pm, Adam Jacob Muller wrote: > Hi, > Have a potentially interesting question here, wondering if anyone has > done this one before and could shed some light for me. > I have a bit of PHP code that needs to extract some quoted strings, > so, very simply: > "hello" > perfectly fine and works great > but, it should also be able to extract > "hel\"lo" > bit more complex now > > Ideally, it would also handle > "hel\\"lo" > properly > > it should also handle > "hel\\\"lo" > > > Any ideason how to do this? attempts to write a PCRE to do this are > so- > far unsuccessful, i'm sure I could badger some PHP code into doing it > perhaps, but i'd love some elegant PCRE solution that thus-far evades > me :( > > > Any ideas are appreciated. > > -Adam > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php