Rules
"182745909809283949 minus 4" ~~ token { \d+ ' plus ' \d+ }
What about...?
"182745909809283949 plus 4" ~~ token { \d+ ' plus ' \d+ }
Doesn't match, because there are too many spaces around plus
Optional whitespace is common in matching
Parrot | Perl 6 regexes | #22 |
"182745909809283949 minus 4" ~~ token { \d+ ' plus ' \d+ }
What about...?
"182745909809283949 plus 4" ~~ token { \d+ ' plus ' \d+ }
Doesn't match, because there are too many spaces around plus
Optional whitespace is common in matching
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |