How to make regular expression in PHP? Can anyone guide me to the basic rules to make regular expressions?
+2
A:
http://php.net/manual/en/function.preg-match.php
http://php.net/manual/en/function.preg-replace.php
php.net in general has the entire documentation for the php language. It's probably one of the more valuable resources available.
OmnipotentEntity
2010-10-28 15:14:38
A:
A good start would be the PHP manual for regular expressions:
Regular Expressions (Perl-Compatible)
There are three major use cases for regular expressions:
- Searching: preg_match
- Replacing: preg_replace
- Splitting: preg_split
DR
2010-10-28 15:15:59
A:
Check out this regex tutorial and its PHP section for details on how to use regexes in PHP.
Tim Pietzcker
2010-10-28 15:16:21
A:
See the book of PHP’s PCRE functions, in particular the chapter on PCRE’s pattern syntax.
Gumbo
2010-10-28 15:16:32
A:
Here are a couple tutorials on using regular expressions in PHP that will get you started:
Wyatt Anderson
2010-10-28 15:17:26