Skip to calculator
Veomark

Free · Instant · No signup

Regex Match Highlighter

Highlight and list matches. For flags, capture groups, and presets, use the Regex Tester.

Page updated 2026-09-04.

Regex Match Highlighter visual
Sponsored

Calculator

Without surrounding slashes.

Example: gi

Capped at 20k chars.

Calculated Results

Match count

--

Sponsored

Counting and previewing what a pattern actually matches

The pattern \bveomark\b with flags gi against 'Veomark ships tools. / Another veomark line.' finds 2 matches: 'Veomark' and 'veomark' -- both instances of the word, regardless of capitalization, because the i (case-insensitive) flag is set.

\b on both sides of 'veomark' are word-boundary anchors, which is why this pattern matches the standalone word 'veomark' but wouldn't match it as part of a longer word like 'veomarketing' -- the word boundary requires a transition between a word character and a non-word character (or string edge) at each \b position.

Without the g (global) flag, this pattern would only report the first match rather than continuing to search the rest of the haystack text -- g is what makes 'match count' meaningfully greater than 1 possible for a haystack containing multiple occurrences.

Practical limits on what gets tested and shown

Haystack is capped at 20,000 characters. Invalid flags surface as an error. This limit exists to keep pattern testing fast and responsive in the browser -- for testing a regex against a much larger document, test against a representative excerpt rather than the full text, since the underlying regex behavior doesn't change based on haystack size.

An invalid flag combination (like using the same flag twice, or a flag character not supported by JavaScript's regex engine) surfaces as an explicit error rather than silently ignoring the bad flag -- useful for catching a typo in the flags field before assuming the pattern itself is the problem.

Only the first 10 matches are shown in the preview even if the count is higher -- useful for confirming the pattern behaves as expected without needing to display potentially hundreds of matches in a long document.

Related regex and pattern tools

For a plain-English explanation of what a pattern like this actually means (useful for regex you didn't write yourself), the Regex to English Explainer covers that.

For interactively building and testing a pattern with more detailed match-group breakdowns, the Regex Tester is the companion tool.

Frequently Asked Questions (FAQ)

Why do both 'Veomark' and 'veomark' match with different capitalization?

Because the i flag makes the match case-insensitive -- without it, only text matching the exact case of the pattern (lowercase 'veomark') would match, and 'Veomark' with a capital V would be missed.

What do the \b word boundaries do in this pattern?

They require a transition between a word character and a non-word character (or the start/end of the string) at each \b position, which is why \bveomark\b matches the standalone word 'veomark' but wouldn't match it if it were part of a longer word like 'veomarketing'.

What happens if I forget the g (global) flag?

Without g, only the first match in the haystack would be found and reported, even if the pattern actually occurs multiple times in the text -- the global flag is what allows the match count to be greater than 1 for a haystack with multiple occurrences.

Why is the haystack limited to 20,000 characters?

Haystack is capped at 20,000 characters. Invalid flags surface as an error. This keeps pattern testing fast and responsive in the browser. For testing against a much longer document, use a representative excerpt -- the regex engine's matching behavior on that excerpt is the same as it would be on the full text.

What happens if I enter an invalid flag combination?

Haystack is capped at 20,000 characters. Invalid flags surface as an error. It surfaces as an explicit error message rather than silently ignoring the invalid flag -- useful for catching a typo in the flags field (like a duplicated or unsupported flag character) before assuming the pattern itself is broken.