Created
October 8, 2012 20:42
-
-
Save mshock/3854844 to your computer and use it in GitHub Desktop.
regex truth constant
This file contains 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
# useful to implement in many scripts that need to verify user input from CLI or config files | |
use constant REGEX_TRUE => qr/^\s*(?:true|(?:t)|(?:y)|yes|(?:1))\s*$/i; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment