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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -