note 68544 deleted from reference.pcre.pattern.syntax by bjori

From: Date: Wed, 02 Aug 2006 12:53:12 +0000
Subject: note 68544 deleted from reference.pcre.pattern.syntax by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-115453@lists.php.net to get a copy of this message
Note Submitter: Nox at Oreigon dot de Reason: useless ---- The following expression will find all correctly escaped parentheses. Here with '{' and '}'. You will simply have to change all occurences to change the behavior for other parentheses. <? $string = 'this is a{test with \\{ and \\}}.'; $reg = '/(?:(?<!\\\\\\){((?:(?:(?<=\\\\\\)[{}]|[^{}])' . '|(?R))+)(?<!\\\\\\)})/ms' preg_match($reg, $string, $return); ?> I hope this will help someone. If there are any mistakes, plz write me Thx Nox

« previous php.notes (#115453) next »