[PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-18 Thread Al
A good habit is to use the hex equivalent character for any character that has a special meaning in pregex expressions. e.g., space = \x20 "/" = \x2f "." = \x2e double quotes = \x3d etc. Then you won't have this type of problem and you won't have to use stuff like this: This is for double quo

Re: [PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-18 Thread Paul Scott
On Fri, 2008-01-18 at 12:28 +0200, Nikolay Ananiev wrote: > This is for double quotes: > '/"[^"]*(?:.[^"]*)*"/' > > this is for single: > '/\'[^\']*(?:.[^\']*)*\'/' > > i took these from the smarty compiler class. Has anyone started a commonly used PCRE Regexp library? I

[PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-18 Thread Nikolay Ananiev
This is for double quotes: '/"[^"]*(?:.[^"]*)*"/' this is for single: '/\'[^\']*(?:.[^\']*)*\'/' i took these from the smarty compiler class. "mathieu leddet" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi everyone, I am struggling with regular expressi

Re: [PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-17 Thread Jochem Maas
Max Antonov schreef: mathieu leddet writes: Hi everyone, I am struggling with regular expression trying to match strings delimited by double quotes, but taking into consideration that \" is not a string ending character. .. // pattern for catching strings between " $pattern = '#"([^"]*)"

[PHP] Re: Match anything between two " that is not a " except if it is escaped...

2008-01-17 Thread Max Antonov
mathieu leddet writes: Hi everyone, I am struggling with regular expression trying to match strings delimited by double quotes, but taking into consideration that \" is not a string ending character. .. // pattern for catching strings between " $pattern = '#"([^"]*)"#'; . $out conta