Set operations have to be inside the <>. You want something like:
/<[alnum-alpha]>/.

That said, this would be the same as /<digit>/, I think? Please describe in
words what you intended with that regex. (I suspect /<[alpha]>/ is what you
really want, based on your earlier statement.)

On Thu, Aug 2, 2018 at 12:57 AM ToddAndMargo <toddandma...@zoho.com> wrote:

> Hi All,
>
> If there are any letter in the string, I want it to fail
>
>
>
> $ p6 'my $x="9.0v1"; if $x~~/<+alnum>-[<alpha>]>/ {say "Y";}'
> ===SORRY!===
> Unrecognized regex metacharacter - (must be quoted to match literally)
> at -e:1
> ------> my $x="9.0v1"; if $x~~/<+alnum>⏏-[<alpha>]>/ {say "Y";}
> Unable to parse regex; couldn't find final '/'
> at -e:1
> ------> my $x="9.0v1"; if $x~~/<+alnum>-⏏[<alpha>]>/ {say "Y";}
>
>
>
> What am I doing wrong?
>
> Many thanks,
> -T
>


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

Reply via email to