Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

C# Regex Literal Builder with JavaScript Preview

C# string unescape; C# code literals; JS regex preview. Helps prepare C# string literals and options. Match previews run in JavaScript, so C#-specific regex behavior may differ.

Scope of this tool: Helps prepare C# string literals and options. Match previews run in JavaScript, so C#-specific regex behavior may differ.

Runs locally. No network requests.

    
Related tools
Privacy: review the processing notes for this tool. Advertising makes separate network requests; see the Privacy page.

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.