← Guide List GUIDE
Grasp the concept of regular expressions and where they are used in five minutes.

A regular expression is a small language for finding a specific pattern in text. When you express a rule with symbols, such as "three digits followed by a hyphen" or "a word containing @", the engine finds the parts of the string that match that rule. Its four core uses are searching, validating, replacing, and extracting.

The simplest regular expression is just writing the characters you want to find as they are. cat finds cat inside a string. Adding metacharacters on top of that makes it dramatically more expressive. A dot (.) means any single character, an asterisk (*) means zero or more repetitions of the preceding element, and brackets ([abc]) mean one of these characters.

Regular expressions are built into almost every language, including JavaScript, Python, and Java, as well as editors and tools like grep. The syntax has slight dialects, but the core concepts are shared, so once you learn them you can use them anywhere. This tool uses the browser's JavaScript engine.

Regular expressions are powerful, but complex patterns tend to become hard to read quickly. Starting small and growing them one piece at a time while checking as you go in this tester is the fastest way to learn.