Re: regular expression
| From: | Richard Quadling | Date: | Tue, 01 Jun 2010 15:33:58 +0000 |
| Subject: | Re: regular expression | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-305696@lists.php.net to get a copy of this message | ||
On 1 June 2010 16:31, Richard Quadling <rquadling@gmail.com> 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