You are here: Re: [PHP] Re: Question to eregi Syntax « PHP « IT news, forums, messages
Re: [PHP] Re: Question to eregi Syntax

Posted by "david forums" on 07/07/05 20:39

Just for information preg_match is 4-5 times more faster.

regards

david



Le Thu, 07 Jul 2005 19:26:32 +0200, M. Sokolewicz <tularis@php.net> a
écrit:

> Philip Hallstrom wrote:
>
>>> janbro wrote:
>>>
>>>> Hi List,
>>>> my research hasn't turned anything useful up.
>>>> Probably 'cause I don't have enough info.
>>>> I've been playing around with the ereg function.
>>>> What I was wondering is what is the ^ for like
>>>> in the below example?
>>>> ereg('[^[:space:]a-zA-Z0-9_.-]{1,}', $name)
>>>>
>>>> thx
>>>> janbro
>>>
>>> it denotes the "start of the string"
>> Actually, in the above case it doesn't... from the URL referenced...
>> For example, the character class [aeiou] matches any lower case
>> vowel,
>> while [^aeiou] matches any character that is not a lower case vowel.
>> If the ^ is outside of the []'s then it matches the start of the
>> string...
>> -philip
>
> hey,
> you're right ;) must've missed the opening [ there.
> Well spotted!
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация