Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

C# Regex Literal Builder with JavaScript Preview

C# string unescape C# code literals JS regex preview. normalizePattern parses C# regular/verbatim strings and emits C# literals/options, but computeResult runs JS RegExp; the C filename is also misleading.

Scope of this tool: normalizePattern parses C# regular/verbatim strings and emits C# literals/options, but computeResult runs JS RegExp; the C filename is also misleading.

Runs locally. No network requests.

    
Related tools
Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Enter a pattern, choose how it’s written in C#, then run it on your sample text.

  1. Paste your regex into Pattern (raw regex, C# regular string, or C# verbatim @"").
  2. Set options like Ignore case, Multiline (^ $ per line), and Singleline (. matches newlines).
  3. Paste test text and click Check & Run to see matches and groups.

FAQ

Does this use the real .NET (C#) regex engine?

No—this runs in your browser using JavaScript regex, so most basics match up but some .NET-specific features can differ.

How do I paste a C# regex string without messing up backslashes?

Set Input mode to C# regular or verbatim, or leave it on Auto-detect and paste "..." or @"...".

What’s the difference between Multiline and Singleline (C#)?

Multiline changes ^/$ to work per line; Singleline makes . match newlines.

Can I see capture groups and named groups?

Yes—each match lists numeric groups and (when supported by your browser) named groups like (?<name>...).

Why might a pattern work in C# but fail here (or vice versa)?

Engine differences exist (feature support, escaping, lookbehinds, Unicode classes), so treat this as a fast check and confirm in .NET.

How do I generate a copy-paste C# snippet?

The output includes a ready new Regex(@"...", RegexOptions...) line plus both regular and verbatim string literal versions.

Is my data sent to a server?

No—this tool runs locally in your browser and does not make network requests.

Continue your workflow

Browse related tools by task. Use the improved core tools for a consistent workspace with file import, downloads and clear validation errors.