Re: Re: preg guru question
| From: | Adam Bregenzer | Date: | Sat, 14 Feb 2004 05:50:55 +0000 |
| Subject: | Re: Re: preg guru question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177682@lists.php.net to get a copy of this message | ||
On Sat, 2004-02-14 at 00:24, André Cerqueira wrote:
> strange bug happened on my newsreader...
> 'joel boonstra' regex seems to be the better one hehe
> all others forgot that if u start with ', u must end with ' hehe (same
> thing with " :p)
As far as I could tell the regexp I posted was the only one to use a
subpattern to match the first quote type used and then re-apply that
after matching the file name:
'/<img\s+src=([\'"])([^\1]+)\1\s*\/?\s*>/i'
I am a bit of a regular expression fan and I would be interested in
seeing another way to match without using subpatterns. What was Joel's
regexp again?
--
Adam Bregenzer
adam@bregenzer.net
http://adam.bregenzer.net/