I'm using C# regular expressions for my project in compiler design.
I'm working with a lexical analyzer and I have to tokenize the code depending on the rules I have set.
I defined my string as [\".*?\"] and double quote as [\"].
When I input "Hi" it is read as STRING TOKEN.
But when I input " \" ", it yields STRING for " \" and DOUBLE-QUOTE for ".
I want it to be read as STRING TOKEN.
In other words, I want to correctly parse strings containing escaped double quotes.