Hacker News new | ask | show | jobs
by raiph 4138 days ago
Perl 6 unifies "regexes" and recursive descent parsing:

  '$10.00' ~~ rx{ \$ \d+ \. \d\d };

  my $pat = rx{ \p+ \q**2..Inf }; 'pqqpqq' ~~ rx{ <$pat>**2 } 
Note that these "regexes" are syntax, not strings, checked and converted in to a hybrid DFA/NFA at compile-time.