|
Posted by Rik on 04/26/07 17:29
no@email.com wrote:
> Papkin wrote:
>> Hi
>>
>> if (
>> eregi("^[\&/[:space:]/a-zA-Z0-9±ęćłń󶿼ˇĆĘŁŃÓ¦¬Ż\.\/\/-]{2,65}$","Merry
>> & Cat") )
>> return true;
>> else
>> return false;
>>
>> I'd like to match also "&" but this regexp above does not do this,
>> adding \& does not help. Any ideas?
>>
>> Thank you
>
> i see some pretty wild characters there.
> give it a try with this
>
> eregi('[a-z]+ \& [a-z]+', 'Merry & Cat')
>
Or use preg_match:
preg_match('|^[\s&a-z0-9±ęćłń󶿼ˇĆĘŁŃÓ¦¬Ż./\\-]{2,65}$|i',$string);
--
Rik Wasmus
Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Navigation:
[Reply to this message]
|