note 53531 added to reference.pcre.pattern.syntax

From: Date: Sun, 05 Jun 2005 06:24:29 +0000
Subject: note 53531 added to reference.pcre.pattern.syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-89930@lists.php.net to get a copy of this message
//to match quotings in code strings by skipping included quotings if they appear use this expression: $matchQuotings='/(((?<!\\\)")((?<=\\\)" |[^"])*((?<!\\\)")) |(((?<!\\\)\')((?<=\\\)\' |[^\'])*((?<!\\\)\')) /'; // for example: matchQuotings finds: // "javascript:func('string-param');" // in strings like this: // ... <a href="javascript:func('string-param')"> ... // and finds: // 'javascript:func("string-param");' // in strings like this: // ... <a href="javascript:func('string-param')"> ... // and finds: // 'a "b" c' // "d 'e' f" // in strings like this: // ... x 'a "b" c' y "d 'e' f" z... ---- Manual Page -- http://www.php.net/manual/en/reference.pcre.pattern.syntax.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53531 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53531&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53531&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53531&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53531&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53531&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53531&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89930) next »