Re: [PHP] extract escaped quoted strings
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Sat, 29 Mar 2008 20:34:53 -0400
On Sat, 2008-03-29 at 19:16 -0400, 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.
Extract quoted strings from what? The source makes a huge difference on
the complexity required to extract the strings.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
.
- Follow-Ups:
- Re: [PHP] extract escaped quoted strings
- From: Adam Jacob Muller
- Re: [PHP] extract escaped quoted strings
- References:
- extract escaped quoted strings
- From: Adam Jacob Muller
- extract escaped quoted strings
- Prev by Date: extract escaped quoted strings
- Next by Date: Re: [PHP] extract escaped quoted strings
- Previous by thread: extract escaped quoted strings
- Next by thread: Re: [PHP] extract escaped quoted strings
- Index(es):