A regular expression is a sequence of characters that forms a search pattern. When you search for data in a text, you can use this search pattern to describe what you are searching for.
A regular expression can be a single character, or a more complicated pattern.
Regular expressions can be used to perform all types of text search and text replace operations.
Syntax
In PHP, regular expressions are strings composed of delimiters, a pattern and optional modifiers.
$exp = "/Wikitechy/i";
Regular Expression Functions
preg_match() - Returns 1 if the pattern was found in the string and 0 if not
preg_match_all() - Returns the number of times the pattern was found in the string, which may also be 0
preg_replace() - Returns a new string where matched patterns have been replaced with another string
preg_match() Function
The preg_match() function will tell you whether a string contains matches of a pattern.
Related Searches to PHP Regular Expression - PHP Regex
php regular expression onlinephp regular expression examplestypes of regular expression in phpphp regular expression special charactersevery expression in php ends with whatadvantages of regular expression in phpregular expression in phpphp regular expression replacephp regular expression for emailphp regular expression validationpattern php regular expressionphp form validation using regular expressionphp preg_match regular expressionphp email validation using regular expressionphp email validation regular expression