tags:

views:

45

answers:

5

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

DR
A: 

Check out this regex tutorial and its PHP section for details on how to use regexes in PHP.

Tim Pietzcker
A: 

See the book of PHP’s PCRE functions, in particular the chapter on PCRE’s pattern syntax.

Gumbo
A: 

Here are a couple tutorials on using regular expressions in PHP that will get you started:

Wyatt Anderson