문제

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