note 40351 deleted from function.preg-match by aidan
| From: | aidan@php.net | Date: | Sun, 04 Jul 2004 16:22:24 +0000 |
| Subject: | note 40351 deleted from function.preg-match by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72532@lists.php.net to get a copy of this message | ||
Note Submitter: Christoph S.
----
A more complex regex that matches all text up to the first, unquoted colon (works with escaped
quotes):
<?php
preg_match(
'((((?<!\\)"([^"]|(\\"))*(?<!\\)")|(\\")|[^:"])*):' ,
$line, $regs)
?>
Example:
Param="Value\":\"Value":XXX