![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveREGEX: Quotes still captured, don't want them
From: Robert Oschler <no-mail-please@nospam.com>
Date: Sun Jul 31 2005 - 20:23:30 CEST
I am trying to strip out the contents of all double-quoted phrases in a
preg_match_all("/(?:\").*?(?:\")/i", $theString, $matches,
Given the following input string, whose quotes are escaped (slashed):
dogs \"bean bags\" cats \"in quotes\"
I get these two matches:
"bean bags\"
As you can see, I'm still capturing the quotes and one, but curiously not
I want to get just the contents of the string inside the slashed
1) How can I get just the contents of the string inside the slashed
2) Why are the double-quotes still being captured despite my use of
3) Why did only one of the slashes get captured?
Thanks
|