PERL based regular expressions used in PHP are the most common syntax being used around. Integrate functions and properties handling the PHP PERL based regular expressions are shown in examples below.

PERL based functions:

The preg_match() function

The preg_match() function performs a regular expression match where an expression is tested against the string pattern. This integrated function is very useful when creating search engines or search fields.

Basic example with preg_match() function

Example showing a word search with Regex

The preg_replace() function

The preg_replace() function performs a regular expression search and replace a string defined in the string pattern. 

Example with preg_replace() function

The preg_split() function

The preg_split() function splits a string defined in the string pattern and saves it's output in an array

Example with preg_split() function

 

›› go to examples ››