# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #130217] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=130217 >
Code: say ‘25_8thelloworld_234aeou’ ~~ / <+ident +[∞]> / Result: 「_8thelloworld_234aeou」 Code: say ‘25∞_8thelloworld_234aeou’ ~~ / <+ident +[∞]> / Result: ∞ Obviously, <ident> is not a character class, but you can still use like if it was. More generally, you can use *any* rule exactly the same way, as long as it is in the grammar: Code: grammar Blah { rule TOP { <+foo -bar> }; rule foo { .+ }; rule bar { <[def]>+ } }; say Blah.parse(‘abcdefgh’)' Result 「abcdefgh」 Obviously, the code above does not make any sense, which is why I think Perl 6 should be smart enough to give a warning in this case. Could be something like “attempt to use a complex rule as a character class” or something along the lines. Related doc ticket: https://github.com/perl6/doc/issues/973 Related IRC discussion: https://irclog.perlgeek.de/perl6/2016-11-29#i_13650256