note 76782 added to function.fnmatch
| From: | Sinured at osu1 dot php dot net | Date: | Mon, 30 Jul 2007 17:14:30 +0000 |
| Subject: | note 76782 added to function.fnmatch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129053@lists.php.net to get a copy of this message | ||
Possible flags (scratched out of fnmatch.h):
...::...
FNM_PATHNAME:
> Slash in $string only matches slash in $pattern.
FNM_PERIOD:
> Leading period in $string must be exactly matched by period in $pattern.
FNM_NOESCAPE:
> Disable backslash escaping.
FNM_NOSYS:
> Obsolescent.
FNM_FILE_NAME:
> Alias of FNM_PATHNAME.
FNM_LEADING_DIR:
> From fnmatch.h: /* Ignore `/...' after a match. */
FNM_CASEFOLD:
> Caseless match.
Since theyâre appearing in file.c, but are not available in PHP, weâll have to define them
ourselves:
<?php
define('FNM_PATHNAME', 1);
define('FNM_PERIOD', 4);
define('FNM_NOESCAPE', 2);
// GNU extensions
define('FNM_FILE_NAME', FNM_PATHNAME);
define('FNM_LEADING_DIR', 8);
define('FNM_CASEFOLD', 16);
?>
I didnât test any of these except casefold, which worked for me.
----
Server IP: 217.13.201.10
Probable Submitter: 172.179.100.132
----
Manual Page -- http://www.php.net/manual/en/function.fnmatch.php
Edit -- https://master.php.net/note/edit/76782
Del: integrated -- https://master.php.net/note/delete/76782/integrated
Del: useless -- https://master.php.net/note/delete/76782/useless
Del: bad code -- https://master.php.net/note/delete/76782/bad+code
Del: spam -- https://master.php.net/note/delete/76782/spam
Del: non-english -- https://master.php.net/note/delete/76782/non-english
Del: in docs -- https://master.php.net/note/delete/76782/in+docs
Del: other reasons-- https://master.php.net/note/delete/76782
Reject -- https://master.php.net/note/reject/76782
Search -- https://master.php.net/manage/user-notes.php