Re: Re: Match anything between two " that is not a " except if it is escaped...
| From: | Paul Scott | Date: | Fri, 18 Jan 2008 13:20:04 +0000 |
| Subject: | Re: Re: Match anything between two " that is not a " except if it is escaped... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267541@lists.php.net to get a copy of this message | ||
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? It could be a
simple wiki page or something (we had one on our old site that was
getting quite large - but that is now gone - sigh)
Anyway, is anyone up for that? These things come up pretty often, and
having a library of common ones would save us all a lot of effort in
these types of threads. Something like:
Purpose: ....
regex : ....
Author : ....
Thoughts? We could use
http://fsiu.uwc.ac.za/index.php?module=wiki&action=view_page&name=RegularExpressionMethods
for it.
--Paul