Re: regular expression

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

 



On 1 June 2010 16:31, Richard Quadling <rquadling@xxxxxxxxx> wrote:
> $re1 = '/^[a-z]++$/i';



^[a-z]++$

Options: case insensitive; ^ and $ match at line breaks

Assert position at the beginning of a line (at beginning of the string
or after a line break character) «^»
Match a single character in the range between “a” and “z” «[a-z]++»
   Between one and unlimited times, as many times as possible, without
giving back (possessive) «++»
Assert position at the end of a line (at the end of the string or
before a line break character) «$»


> $re2 = '/^[a-z ]++$/i';



^[a-z ]++$

Options: case insensitive; ^ and $ match at line breaks

Assert position at the beginning of a line (at beginning of the string
or after a line break character) «^»
Match a single character present in the list below «[a-z ]++»
   Between one and unlimited times, as many times as possible, without
giving back (possessive) «++»
   A character in the range between “a” and “z” «a-z»
   The character “ ” « »
Assert position at the end of a line (at the end of the string or
before a line break character) «$»


-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
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