RE: [PHP] Simple RegExp Problem...
| From: | Ernest E Vogelsinger | Date: | Fri, 22 Nov 2002 21:23:10 +0000 |
| Subject: | RE: [PHP] Simple RegExp Problem... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125668@lists.php.net to get a copy of this message | ||
At 21:59 22.11.2002, @ Nilaab said:
--------------------[snip]--------------------
>Thanks so much!!! It works. I didn't know I could also place extra
>characters inside the brackets to specify what I want. :)
--------------------[snip]--------------------
The square brackets simply form a group of characters that are either
allowed ('[abc]') or not allowed ('[^abc]').
Instead of specifying '/[a-zA-Z]/' you have also the option of saying
'/[a-z]/i', the i modifier making the whole regex case independent.
For deeper regex insights (esp. for the preg_xxx functions which I
personally prefer) I suggest visiting the Perl docs at
Doc: http://www.perldoc.com/perl5.8.0/pod/perlre.html
QuickIntro: http://www.perldoc.com/perl5.8.0/pod/perlrequick.html
Tutorial: http://www.perldoc.com/perl5.8.0/pod/perlretut.html
For the PHP guyz'n gals listening - I suggest these links making it into
the PHP docs :)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/