Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Raku regex assert doesn't match

0 views
Skip to first unread message

Darren Duncan

unread,
Jul 30, 2023, 12:30:06 AM7/30/23
to perl6-users
Hello, I have a Raku regex question.

See the following:

token nonquoted_alphanumeric_text
{
<!before [null | false | true] <wb>>
<[ A..Z _ a..z ]> <[ 0..9 A..Z _ a..z ]>*
}

What I want is for "nonquoted_alphanumeric_text" to match any simple ASCII
bareword EXCEPT a few special cases indicated in the example.

I was hoping there might be some better way of specifying this than my example.

Is there any more direct way in Raku to say, match this pattern initially, but
if the result equals these exceptional values then treat it as having not matched.

I am looking for a fully declarative solution in the grammar itself, not
something involving post-processing.

Thank you.

-- Darren Duncan

0 new messages