Re: Re: Question to eregi Syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux