QuickBooks/Utilities.php
static public function fnmatch($pattern, $str)
	{
		if (function_exists('fnmatch'))
		{
			return fnmatch($pattern, $str, FNM_CASEFOLD);
		}
		
		$arr = array(
			'\*' => '.*', 
			'\?' => '.'
			);
		return preg_match('#^' . strtr(preg_quote($pattern, '#'), $arr) . '$#i', $str);
	}
static public function fnmatch($pattern, $str)
	{
		if (function_exists('fnmatch'))
		{
			return fnmatch($pattern, $str, FNM_CASEFOLD);
		}
		
		$arr = array(
			'\*' => '.*', 
			'\?' => '.'
			);
		return preg_match('#^' . strtr(preg_quote($pattern, '#'), $arr) . '$#i', $str);
	}
Tell if a pattern matches a string or not (Windows-compatible version of www.php.net/fnmatch)

@param string $pattern
@param string $str
@return boolean