Question

How can I write a regular definition in (f)lex for quoted strings from AT&T language?

Example of string that come to my mind:

  • "abc"
  • "a\"bc"
  • "abc\"
  • "abc\""

Later edit:

  • "abc" "def" should be matched as two strings
  • "ab\"c" "def" should be matched as two strings
  • "abc\" "def" should be matched as two strings

The definition \"[^\"]\" is not working because it will match "abc" "def" as one string.

Was it helpful?

Solution

could you be more specific as to what strings you are trying to match? Strings that start and end with "? What do you mean by AT&T language?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top