regex-tester

Test a pattern against sample text with live highlighting. Options are labeled to match .NET's RegexOptions enum. Uses JavaScript's regex engine under the hood — see notes below for where that differs from .NET.

client-side only RegexOptions mapped
pattern.regex
highlighted matches
Enter a pattern and test string.

// RegexOptions mapping

// where .NET regex and JS regex actually diverge

For the vast majority of patterns you'll write in a backend service — validation, parsing, log scraping — .NET's regex engine and JavaScript's behave identically, since both are backtracking engines with very similar syntax. The differences that matter show up in a few specific spots:

If your pattern only uses standard character classes, quantifiers, anchors, and groups (which covers most real-world validation patterns), what you see here will match .NET's behavior exactly.