Regex Tester
Test regular expressions against any text in real time.
Pattern
Test string
Hello World! My name is Alice and I live in Amsterdam.
5 matches
HelloWorldMyAliceAmsterdam
What this tool does
Tests a regular expression against a string of text in real time. Matched sections are highlighted in yellow. Shows all matches with their exact positions.
Input fields explained
Pattern
The regex pattern between the two slashes. Examples: \d+ for numbers, [A-Z][a-z]+ for capitalized words, \b\w{5}\b for exactly 5-letter words.
Flags
g = global (find all matches), i = case-insensitive, m = multiline (^ and $ match line starts/ends). Combine: gi for all case-insensitive matches.
Test string
The text to run the regex against. All matches are highlighted in the output area below.
π‘ Tips & context
β\d = digit, \w = word character, \s = whitespace, . = any character
β^ matches start of string, $ matches end
β* = 0 or more, + = 1 or more, ? = 0 or 1, {n} = exactly n times
Formula / How it works
Flags: g=global, i=case-insensitive, m=multiline The matched parts are highlighted in yellow. Match count and positions are shown below.