سؤال

I am trying to write a .flex file that recognises a string literal,which is a sequence of characters surrounded by double quotes. No escape characters, but I just cant get it to identify them, This is my latest attempt.

\"(\\.|[^"])*\"

Any suggestions

هل كانت مفيدة؟

المحلول

You could use instead

\"(.[^\"]*)\"
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top