C
C#2y ago
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?
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server