Created
January 18, 2011 03:29
-
-
Save vito/783933 to your computer and use it in GitHub Desktop.
atomo's regexp flags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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