[Typo3-dev] Wildcard match on globalString
Michael Stucki
michael at typo3.org
Sun Oct 23 18:47:37 CEST 2005
Ries van Twisk wrote:
> The routine: function matchWild($haystack,$needle) {...}
> Doesn't do a wildcard match on just *,
> I would suspect (I might be wrong) that it would match any empty string
> there.
>
> Instead this case condition get's triggered and does a exact match.
> case 'beforeafter':
> if (strstr($haystack,substr($needle,1,-1))) return true;
> break;
>
> What can I do to do a wildcard on globalString (match a non empty
> string)? except writing a user function.....
It's not possible atm, sorry
- michael
PS: I just changed the matchWild function to make it compare using
preg_match instead of the very limited * at the beginning or the end of the
string. So it should be possible in 4.0...
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-dev
mailing list