note 111469 deleted from regexp.reference.back-references by danbrown
| From: | danbrown@php.net | Date: | Mon, 04 Mar 2013 17:55:35 +0000 |
| Subject: | note 111469 deleted from regexp.reference.back-references by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-193853@lists.php.net to get a copy of this message | ||
Note Submitter: jon at edgeoftheweb dot co dot uk
----
It took me a little tweaking to figure out that the backslash needs escaping:
<?php
$string = "sense and sensibility";
preg_match("/^(sens|respons)e and \\1ibility$/", $string);
?>