Match a filename or string against the specified pattern in PHP
Description
The following code shows how to match a filename or string against the specified pattern.
Example
//from w w w . j ava2s.c o m
<?php
$txt = "Sky is darkgrey...";
if (fnmatch("*gr[ae]y",$txt)){
echo "some form of gray ...";
}
?>