[TYPO3-core] RFC: Support regular expressions int3lib_matchCondition
Martin Kutschker
Martin.Kutschker at blackbox.net
Mon Mar 6 21:48:17 CET 2006
Michael Stucki <michael at typo3.org> writes on
Mon, 06 Mar 2006 21:38:19 +0100 (MET):
>
+1
But you could even add a ? single char wildcard for true shell-like patterns *:
$needle = str_replace(array('*','?'),
array('###MANY###','###ONE###), $needle);
$regex = '/^'.preg_quote($needle,'/').'$/';
$regex = str_replace(array('###MANY###','###ONE###),
array('.*','.'), $regex);
Masi
* I know, modern shells have even more patterns, but these are the classic ones.
More information about the TYPO3-team-core
mailing list