note 109369 added to regexp.reference.alternation
| From: | dmilosx at verat dot com | Date: | Wed, 11 Jul 2012 09:21:43 +0000 |
| Subject: | note 109369 added to regexp.reference.alternation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189096@lists.php.net to get a copy of this message | ||
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"
}
----
Server IP: 203.121.145.121
Probable Submitter: 91.143.209.2
----
Manual Page -- http://www.php.net/manual/en/regexp.reference.alternation.php
Edit -- https://master.php.net/note/edit/109369
Del: integrated -- https://master.php.net/note/delete/109369/integrated
Del: useless -- https://master.php.net/note/delete/109369/useless
Del: bad code -- https://master.php.net/note/delete/109369/bad+code
Del: spam -- https://master.php.net/note/delete/109369/spam
Del: non-english -- https://master.php.net/note/delete/109369/non-english
Del: in docs -- https://master.php.net/note/delete/109369/in+docs
Del: other reasons-- https://master.php.net/note/delete/109369
Reject -- https://master.php.net/note/reject/109369
Search -- https://master.php.net/manage/user-notes.php