On Tue, Jan 06, 2009 at 04:41:30PM +0300, Richard Hainsworth wrote:
> Supposed I define
> regex digit { [0..9] }

Note that you probably want 

    regex digit { <[0..9]> }

Also, Perl 6 already provides a 'digit' rule by default, although
it's digits in the Unicode sense as opposed to simply the 0..9

> what is the negative?
> By analogy, it should be <!digit> but I cant find this in the Synopses  
> (possibly missed the relevant section).
> if /<[0..9]>/ then the negative is /<![0..9]>/

You're looking for <-[0..9]>, which means "any character not in
this list".  There's also <-digit>, which means "match a character
if we don't match a <digit>".

I'll leave the given/when discussion to the other thread that
was started on the topic.


Reply via email to