note 109369 deleted from regexp.reference.alternation by danbrown
| From: | danbrown@php.net | Date: | Mon, 16 Jul 2012 15:37:11 +0000 |
| Subject: | note 109369 deleted from regexp.reference.alternation by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189193@lists.php.net to get a copy of this message | ||
Note Submitter: dmilosx at verat dot com
----
code:
<?php
$match='';
echo 'result = ' . preg_match( '/gilbert|sullivan/', 'gilbert', $match
) .PHP_EOL;
var_dump( $match );
echo 'result = ' . preg_match( '/gilbert|sullivan/', 'sullivan',
$match ) .PHP_EOL;
var_dump( $match );
?>
output:
result = 1
array(1) {
[0]=>
string(7) "gilbert"
}
result = 1
array(1) {
[0]=>
string(8) "sullivan"
}