[Typo3-dev] Wildcard match on globalString
Ries van Twisk
typo3 at rvt.dds.nl
Mon Oct 24 07:27:48 CEST 2005
Michael Stucki wrote:
>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...
>
>
Cool,
thanks Michael!
In the meantime I have written my own little runaround using function in
my condition.
I was just surpriced about the 'functionality'.
cheers,
Ries van twisk
More information about the TYPO3-dev
mailing list