© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
jeppe9821

❔ Regex help

I have this regex:

(?<![\[\]])(?:"&QUOTE&"([^"]*?)"&QUOTE&"|[^",\[\]]+)(?![\[\]])
(?<![\[\]])(?:"&QUOTE&"([^"]*?)"&QUOTE&"|[^",\[\]]+)(?![\[\]])


And when pasting to C# it looks like this:

var regexMatch = Regex.Match(fileText, @"(?<![\[\]])(?:""&QUOTE&""([^""]*?)""&QUOTE&""|[^"",\[\]]+)(?![\[\]])");
var regexMatch = Regex.Match(fileText, @"(?<![\[\]])(?:""&QUOTE&""([^""]*?)""&QUOTE&""|[^"",\[\]]+)(?![\[\]])");


In regex101 it works properly, but when pasting to C# it only gives me a single match. Why?
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Regex help.
C#CC# / help
11mo ago
❔ REGEX help!
C#CC# / help
3y ago
✅ Regex help pls:
C#CC# / help
3y ago
✅ help with regex
C#CC# / help
4y ago