That document also says that _ is considered a letter (that is, is matched
by <alpha>:
https://docs.perl6.org/language/regexes#Predefined_Character_Classes), so
that's the same thing as <digit>. I observed that earlier as well.

On Fri, Aug 3, 2018 at 2:37 PM Parrot Raiser <1parr...@gmail.com> wrote:

> If I've interpreted this
>
> https://docs.perl6.org/language/regexes#Enumerated_character_classes_and_ranges
> correctly,
>
> ^ is "start of string"
> +alnum means "in the alphanumeric set"
> -alpha   means "not in the purely alphabetic set"
> i.e. <+alnum -alpha> means "alphanumeric but not a letter", i.e 0-9_
> + is "one or more of the preceding set"
> $ is "end of string"
>
> On 8/3/18, ToddAndMargo <toddandma...@zoho.com> wrote:
> > On 08/02/2018 05:18 AM, Timo Paulssen wrote:
> >> Is this what you want?
> >>
> >> perl6 -e 'say "12345" ~~ /^<+alnum -alpha>+$/'
> >> 「12345」
> >>
> >> perl6 -e 'say "123a45" ~~ /^<+alnum -alpha>+$/'
> >> Nil
> >>
> >> HTH
> >>    - Timo
> >>
> >
> > What does the following do?
> >
> >       +alnum   (why does it need the "+"?)
> >       -alpha   (I presume "-" means negate?)
> >       +$
> >
> > Many thanks,
> > -T
> >
>


-- 
brandon s allbery kf8nh
allber...@gmail.com

Reply via email to