Regular Expressions 101
Save & Manage Regex
- Save & Share
Editor
- Flavor: PCRE2 (PHP)
- Match
- Substitution
- List
- Unit Tests
Tools
- Export Matches
Sponsors
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
- All Tokens
- Common Tokens
- General Tokens
- Anchors
- Meta Sequences
- Quantifiers
- Group Constructs
- Character Classes
- Flags/Modifiers
- Substitution
- A single character of: a, b or c[abc]
- A character except: a, b or c[^abc]
- A character in the range: a-z[a-z]
- A character not in the range: a-z[^a-z]
- A character in the range: a-z or A-Z[a-zA-Z]
- Any single character.
- Alternate - match either a or ba|b
- Any whitespace character\s
- Any non-whitespace character\S
- Any digit\d
- Any non-digit\D
- Any word character\w
- Any non-word character\W
- Non-capturing group(?:...)
- Capturing group(...)
- Zero or one of aa?
- Zero or more of aa*
- One or more of aa+
- Exactly 3 of aa{3}
- 3 or more of aa{3,}
- Between 3 and 6 of aa{3,6}
- Start of string^
- End of string$
- A word boundary\b
- Non-word boundary\B
