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
>

Reply via email to