Skip to content

Instantly share code, notes, and snippets.

@vito
Created January 18, 2011 03:29
Show Gist options
  • Save vito/783933 to your computer and use it in GitHub Desktop.
Save vito/783933 to your computer and use it in GitHub Desktop.
atomo's regexp flags
-- standard Perl
toOpt 'm' = return compMultiline
toOpt 's' = return compDotAll
toOpt 'i' = return compCaseless
toOpt 'x' = return compExtended
-- additional
toOpt 'a' = return compAnchored
toOpt 'G' = return compUngreedy
toOpt 'e' = return compDollarEndOnly
toOpt 'f' = return compFirstLine
toOpt 'C' = return compNoAutoCapture
toOpt c = fail $ "unknown regex flag " ++ show c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment