note 71725 added to function.fnmatch
| From: | jkatricochetsolutionsdotcom at osu1 dot php dot net | Date: | Wed, 13 Dec 2006 13:39:08 +0000 |
| Subject: | note 71725 added to function.fnmatch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120575@lists.php.net to get a copy of this message | ||
soywiz's function didnt seem to work for me, but this did.
<?php
if(!function_exists('fnmatch')) {
function fnmatch($pattern, $string) {
return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*'
=> '.*', '\?' => '.'))."$#i", $string);
} // end
} // end if
?>
----
Server IP: 66.163.161.117
Probable Submitter: 209.204.83.5
----
Manual Page -- http://www.php.net/manual/en/function.fnmatch.php
Edit -- https://master.php.net/note/edit/71725
Del: integrated -- https://master.php.net/note/delete/71725/integrated
Del: useless -- https://master.php.net/note/delete/71725/useless
Del: bad code -- https://master.php.net/note/delete/71725/bad+code
Del: spam -- https://master.php.net/note/delete/71725/spam
Del: non-english -- https://master.php.net/note/delete/71725/non-english
Del: in docs -- https://master.php.net/note/delete/71725/in+docs
Del: other reasons-- https://master.php.net/note/delete/71725
Reject -- https://master.php.net/note/reject/71725
Search -- https://master.php.net/manage/user-notes.php