fork download
  1. use utf8;
  2.  
  3. print "it matches that weird char\n" if "012੧3456" =~ /^\d+$/;
  4. print "it does not match 'a'\n" unless "a" =~ /\d/;
  5. print "with the 'a' modifier, it does not match anymore\n" unless "012੧3456" =~ /^\d+$/a;
Success #stdin #stdout 0.01s 4760KB
stdin
Standard input is empty
stdout
it matches that weird char
it does not match 'a'
with the 'a' modifier, it does not match anymore