regex - blank in regular expression in flex -
i have following regular expression in flex file. (.l file)
doctype [[:blank:] \r\n]*<!doctype[^\[]*\[[[:blank:] \r\n]* from flex tutorial, in pattern chapiter, saw flex defines ‘[:blank:]’ blank or tab.
in expression above, why need blank after [:blank:]?
the [:blank:] posix character class matches space or tab (even in flex patterns manual).
thus, [[:blank:] \r\n] character class equals [[:blank:]\r\n].
same [rr] = [r].
Comments
Post a Comment