\d and <digit> both match Unicode characters as well. If that's not the intention then it's best to be explicit.
die("Horribly") unless "9.b1" ~~ / <[0-9]+> % '.' /; Typing from my phone so unable to test the above*** On Thu, Aug 2, 2018, 12:56 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 >