Check and Test Regular Expressions

Test regular expressions online. Analyze matches, correct errors, and create effective patterns for data search.

No matches found

No matches found

No matches found

No non-matching content

Quick Reference

Regular Expression Basics

^Start of string
$End of string
.Metacharacter that matches any character except a newline (\n)
|Matches the specified character or group of characters on either side (OR)
\Used to escape a special character
aThe character 'a'
abThe string 'ab'

Quantifiers

*Matches 0 or more occurrences of the preceding element
?Matches 0 or 1 occurrence of the preceding element
+Matches 1 or more occurrences of the preceding element
{5}Matches exactly 5 occurrences
{5,}Matches 5 or more occurrences of the preceding character or group
{5,10}Matches between 5 and 10 occurrences

Character Classes

\sMatches a whitespace character
\SMatches a non-whitespace character
\wMatches a 'word' character (alphanumeric + underscore)
\WMatches a non-'word' character
\dMatches a single digit
\DMatches a single non-digit character
[\b]Backspace character (backspace)
\cMatches a control character

Special Characters

\nMatches a newline character
\tMatches a tab character
\rMatches a carriage return character
\ZZZMatches the octal character ZZZ (e.g., \040 for a space)
\xZZMatches the hexadecimal character ZZ (e.g., \x20 for a space)
\0Null character (Null)
\vVertical tab

Groups

(xyz)Capturing group of characters
(?:xyz)Non-capturing group of characters
[xyz]Matches any single character from the set x, y, or z
[^xyz]Matches any character *not* in the set x, y, or z
[a-q]Matches any character in the range from 'a' to 'q'
[0-7]Matches any digit in the range from '0' to '7'

String Replacements

$`Inserts the portion of the string that precedes the match
$'Inserts the portion of the string that follows the match
$+Inserts the last matched capturing group
$&Inserts the entire matched string
$nInserts the nth captured group (e.g., $1, $2)

Assertions (Lookaheads/Lookbehinds & Boundaries)

(?=xyz)Positive lookahead (asserts that xyz follows)
(?!xyz)Negative lookahead (asserts that xyz does *not* follow)
(?<=xyz)Positive lookbehind (asserts that xyz precedes)
(?<!xyz)Negative lookbehind (asserts that xyz does *not* precede)
\bWord boundary (position between a 'word' and a non-'word' character)
\BNot a word boundary
(?#comment)Comment (is ignored by the regex engine)

Check and Test Regular Expressions

alien

Please note that regular expressions in this tool are processed according to the ECMAScript standard (JavaScript RegExp). This means that the behavior of patterns corresponds to how they work in a browser or in JavaScript code. Some constructs, such as character escaping (/ and /), may behave the same way, even if they look different. If you are used to regular expressions in other languages (for example, Python, PHP, .NET or POSIX), note that they may have differences in syntax and matching logic.

This tool allows you to test regular expressions (RegEx) and check their operability. RegEx is widely used in programming, data processing, and SEO analytics.

With it, you can search, replace, and analyze text patterns, simplifying work with large amounts of data.

Frequently Asked Questions (FAQ)

Regular expressions (regex) are powerful pattern-matching tools for searching, validating, and manipulating text. They are essential for data validation, search operations, and text processing tasks.

Rate this tool

4.5(24 users rated)

Useful Instruments

o1

Test Regular Expressions

Allows you to check RegExp patterns in real-time, which simplifies the development and debugging of complex search patterns.

o1

Support for Different Flags and Modifiers

Allows you to consider case sensitivity, global search, multiline mode, and other settings used in programming languages.

o1

Generate Templates for Data Parsing

Allows you to quickly create expressions for automatic processing of large text arrays, logs, and HTML code.