> I am starting on php, coming from Perl. One thing I really like on the way
> we can use regex in Perl is the shorthand:
>
> \w --> [a-zA_Z0-9_]
> \W --> [^a-zA_Z0-9_]
> \d --> [0-9]
> \D --> [^0-9]
> \s --> white space characters
> ...
>
> Is this shorthand handled in php?
Sure, all the preg* f
It's probably a good idea to learn a bit about regular
expressions.
In short, PHP gives us two types of regular expressions
to play with, POSIX and PCRE. For more information :
PCRE : http://php.net/manual/en/ref.pcre.php
POSIX : http://php.net/manual/en/ref.regex.php
The following
2 matches
Mail list logo