T
tester
Hi All,
My CPU taking 100% if I try to match more than the existing number of
specific matches in a string. Script is ...
my $something = "this is a test, just test, no kidding, small test, but
error in test. over over";
if ($something =~ m/((.*)test(.*)){5}/){
print "number of matches are 5, successful";
}
else{
print "no 5 matches, failure";
}
String "test" is repeated only 4 times in $something but if I am trying
to check whether the $something has 5, my CPU taking 100%. What is the
issue?
Thanks,
tester
My CPU taking 100% if I try to match more than the existing number of
specific matches in a string. Script is ...
my $something = "this is a test, just test, no kidding, small test, but
error in test. over over";
if ($something =~ m/((.*)test(.*)){5}/){
print "number of matches are 5, successful";
}
else{
print "no 5 matches, failure";
}
String "test" is repeated only 4 times in $something but if I am trying
to check whether the $something has 5, my CPU taking 100%. What is the
issue?
Thanks,
tester