When I use (?R) in a RegEx pattern in .NET, I get an ArgumentException:
Unrecognized grouping construct.
Does (?R) this have a different syntax in .NET?
The closest thing to recursion that .NET has to offer for Regex is balancing group definition. Recursion is not directly supported in .NET.
According to the documentation, (?R) is not a valid construct in .NET regular expressions, nor is there any mention on that page of "recursive" or "recursion" so apparently this is not supported in .NET.
.NET doesn't support RegEX recursion but you can check this project to use PCRE in .NET
I hope it will be implemented in System.Text.RegularExpressions asap
(?R).