extract escaped quoted strings
- From: php-general@xxxxxxx (Adam Jacob Muller)
- Date: Sat, 29 Mar 2008 19:16:18 -0400
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
.
- Follow-Ups:
- Re: [PHP] extract escaped quoted strings
- From: Casey
- Re: [PHP] extract escaped quoted strings
- From: Robert Cummings
- Re: [PHP] extract escaped quoted strings
- Prev by Date: Re: character encoding
- Next by Date: Re: [PHP] extract escaped quoted strings
- Previous by thread: page content duration
- Next by thread: Re: [PHP] extract escaped quoted strings
- Index(es):