Regular Expression

Support is provided for the plugin, not for specific regular expressions. Some information is provided here, and it can also be found on the internet. It is your responsibility to create an expression that suits your needs.

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.

You can also find some examples specifically for Search Regex on the blog and the preset library.