I am working on writing a regular expression used to test a string in C. That's what I'm still up to
'^"[A-Za-z0-9]*[\t\n]*"$'
for rules - A line must begin with double quotes - Cannot contain a newline character
However, I cannot fix a rule allowing "\" or "" in a string if it is preceded by "\". Here is what I tried:
'^"[A-Za-z0-9]*[\t\n]*[\\\|\\"]?"$'
But this does not seem to work. What could be wrong with regex here?
Regards, darkie15
source
share