note 92074 deleted from function.preg-replace by thiago
| From: | thiago@php.net | Date: | Tue, 07 Jul 2009 20:11:31 +0000 |
| Subject: | note 92074 deleted from function.preg-replace by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158035@lists.php.net to get a copy of this message | ||
Note Submitter: neamar at neamar dot fr
----
I improved the regexp expression for brace matching.
Basically, if you were to ask for in-braces content, you can't control you'll close with
the good brace, e.g. if your regexp is {(.+)} and your text {Content {another content} yet more
content}, preg will stop at the first closing brace even though you want to "match
braces".
My experimenations are a bit long, you'll find them here : http://neamar.fr/Res/RegexpWithBraces/