Last active
August 29, 2015 13:57
-
-
Save tak1n/9778151 to your computer and use it in GitHub Desktop.
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
There are several built-in machines available for use. They are all two state machines for the purpose of matching common classes of characters. They are: | |
– any – Any character in the alphabet. | |
– ascii – Ascii characters. 0..127 | |
– extend – Ascii extended characters. This is the range -128..127 for signed alphabets and the range 0..255 for unsigned alphabets. | |
– alpha – Alphabetic characters. [A-Za-z] | |
– digit – Digits. [0-9] | |
– alnum – Alpha numerics. [0-9A-Za-z] | |
– lower – Lowercase characters. [a-z] | |
– upper – Uppercase characters. [A-Z] | |
– xdigit – Hexadecimal digits. [0-9A-Fa-f] | |
– cntrl – Control characters. 0..31 | |
– graph – Graphical characters. [!-˜] | |
– print – Printable characters. [ -˜] | |
– punct – Punctuation. Graphical characters that are not alphanumerics. [!-/:-@[-‘{-˜] | |
– space – Whitespace. [\t\v\f\n\r ] | |
– zlen – Zero length string. "" | |
– empty – Empty set. Matches nothing. ˆany |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment