note 86429 added to function.mb-ereg-match
| From: | Anonymous at osu1 dot php dot net | Date: | Sat, 18 Oct 2008 13:52:11 +0000 |
| Subject: | note 86429 added to function.mb-ereg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145468@lists.php.net to get a copy of this message | ||
Note that this function matches a string from the beginning only (though not necessarily till the
end):
<?php
$test = mb_ereg_match("a", "some apples"); // returns false
$test = mb_ereg_match("a", "a kiwi"); // returns true
?>
If you want to check for a match anywhere in the string, use the wild-card & repeat operators .*
<?php
$test = mb_ereg_match(".*a", "some apples"); // returns true
?>
----
Server IP: 203.169.164.81
Probable Submitter: 219.73.43.203
----
Manual Page -- http://www.php.net/manual/en/function.mb-ereg-match.php
Edit -- https://master.php.net/note/edit/86429
Del: integrated -- https://master.php.net/note/delete/86429/integrated
Del: useless -- https://master.php.net/note/delete/86429/useless
Del: bad code -- https://master.php.net/note/delete/86429/bad+code
Del: spam -- https://master.php.net/note/delete/86429/spam
Del: non-english -- https://master.php.net/note/delete/86429/non-english
Del: in docs -- https://master.php.net/note/delete/86429/in+docs
Del: other reasons-- https://master.php.net/note/delete/86429
Reject -- https://master.php.net/note/reject/86429
Search -- https://master.php.net/manage/user-notes.php