Hi,
How do I simplify the regex below so that it matches only the number 1, 
henceforth it should return false if I match $string with $match.

use strict;
use warnings;

my $string = "10 11 12 13 40";
my $match = 1;

if ($string =~/^$match | $match | $match$/g){
    print "match";
}else{
   print "unmatch";
};

Reply via email to