Created
August 20, 2010 17:16
-
-
Save anonymous/540747 to your computer and use it in GitHub Desktop.
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
pmichaud@plum:~/nqp-rx$ cat y.nqp | |
#! nqp | |
for < Bool::True True True::X Bool::True::X > { | |
my $match := $_ ~~ / 'Bool::'?: 'True' && <[A..Za..z:\-]>+: /; | |
say( $match ?? "$_ matches" !! "$_ doesn't match"); | |
} | |
pmichaud@plum:~/nqp-rx$ ./nqp y.nqp | |
Bool::True matches | |
True matches | |
True::X doesn't match | |
Bool::True::X doesn't match | |
pmichaud@plum:~/nqp-rx$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment