Regular Expression

A regular expression is a group of characters used to find a pattern within a piece of text. It is often abbreviated to regex, and forms part of the name of Search Regex.

In the context of Search Regex, a plain search will exactly match the search phrase. A regular expression search may match many.

In addition to matching many phrases, a regular expression can extract information from the matched phrase and copy it to the replacement phrase.

Regular expressions are very powerful, and often very difficult.

Note that to enable a regular expression search you must enable the regular expression search flag:

Testing Regular Expressions

There are a lot of resources available for regular expressions, and some of the most useful are regular expression testers. With these you can experiment with a pattern and tune it to match exactly what you want.

Note that Search Regex uses PHP’s regular expressions. These are commonly known as PCRE, and may not be exactly the same as other regular expression libraries.

A good resource to understand regular expressions can be found here.