[TYPO3-core] RFC: Support regular expressions int3lib_matchCondition
Michael Stucki
michael at typo3.org
Wed Mar 8 00:18:13 CET 2006
Committed, thanks for your comment.
- michael
Martin Kutschker wrote:
> 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.
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list