G
gazza67
Anybody,
I want to use a regex in which the string for which we are searching
is a variable. Is this possible - it doesnt seem to work for me.
$a = "be";
$b="to be or not to be";
if ($b =~ m/$a/i )
print "this should be true";
$b = "apples and oranges";
if ($b =~ m/$a/i )
print "this should be false";
Cheers
Gary
I want to use a regex in which the string for which we are searching
is a variable. Is this possible - it doesnt seem to work for me.
$a = "be";
$b="to be or not to be";
if ($b =~ m/$a/i )
print "this should be true";
$b = "apples and oranges";
if ($b =~ m/$a/i )
print "this should be false";
Cheers
Gary