Next: Can I get the flex manual in another format?, Previous: How can I match C-style comments?, Up: FAQ [Contents][Index]
Here are some tips for using ‘.’:
(foo|bar)+ and NOT this (foo|bar+).
The first pattern matches the words ‘foo’ or ‘bar’ any number of
times, e.g., it matches the text ‘barfoofoobarfoo’. The
second pattern matches a single instance of foo or a single instance of
bar followed by one or more ‘r’s, e.g., it matches the text barrrr .
(.|\n)
Beware that the regex (.|\n)+ will match your entire input!