I've once answered a question about matching a quoted string with escaped quotes.
It seems that there are cases that hang on .NET and crash on Mono (with OutOfMemoryException
), for example:
var reg = new Regex(@"^""([^\\""]*(\\"")*(\\[^""])*)*""");
reg.Match("\" ");
Two questions:
1) why does this happen?
2) how to improve this regex? I want it to preserve all the "features".