Glossary Development

Regular expression

A regular expression (regex) is a pattern written in a compact syntax that describes a set of strings, used to search, validate and replace text.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

For example \d{3}-\d{4} matches three digits, a hyphen and four digits. Regex flavours differ slightly between languages. Very complex patterns become unreadable, and some can run catastrophically slowly on crafted input, so keep them simple on untrusted text.

Try these tools

See also

AdSense Placeholder
Slot: footer_leaderboard