Named regular expressions
Create named regular expressions:
regex number { \d+ [ '.' \d+ ]? } my $a = "I owe you 3.45 euros"; if ($a ~~ / <number> /) { say $/; } # "3.45"continued...
Perl 6 | An Introduction to Perl 6 | #29 |
Create named regular expressions:
regex number { \d+ [ '.' \d+ ]? } my $a = "I owe you 3.45 euros"; if ($a ~~ / <number> /) { say $/; } # "3.45"continued...
Copyright © 2008 Patrick Michaud |