Free tools
Regex Tester
A free regular expression tester. Try out the rest of our free dev resources.
//g
Flags
Match information
3 matches
He was oddly fascinated by the strangely quickly hummingbird.
Match 1:
oddlyIndex: 7
Match 2:
strangelyIndex: 31
Match 3:
quicklyIndex: 41
Regex cheat sheet
\d Any digit \w Any word character . Any character except newline * Zero or more + One or more ? Zero or one ^ Start of string $ End of string (...) Capture group [abc] Character class
FAQ
- How do you use a regex tester?
- Enter a pattern, optional flags (g, i, m, s, u, y), and a test string. Matches highlight in the text and appear in the match list with indexes and capture groups.
- What is a regular expression?
- A regex is a search pattern for matching, validating, extracting, or replacing text. Most languages and editors support a similar dialect of metacharacters and quantifiers.
- Which flags matter most?
- g finds all matches, i ignores case, m makes ^ and $ line-aware, and s lets . match newlines. Combine flags as needed (for example, gi).