Hello all
im trying to get the Comparison operators from string with out much success
I have :
$myvar = "if (hhhh <= blah.count )" ;
when I do :
if ($myvar =~ m/.*([<=|=|<|>|>=]).*/){
.......
}
I keep getting the "=" and not "<="
why ?
Hello all
im trying to get the Comparison operators from string with out much success
I have :
$myvar = "if (hhhh <= blah.count )" ;
when I do :
if ($myvar =~ m/.*([<=|=|<|>|>=]).*/){
.......
}
I keep getting the "=" and not "<="
why ?
Try :
if ($myvar =~ m/.*(<=|=|<|>|>=).*/){
Jean-Pierre.
Tnx for the fast reply but no... it still dont catch if i have :
$myvar = "if (hhhh <= blah.count )" ;
it finds me in the $1 "=" and not "<="
?
how can i recognize match of word duplication in string
for example if i have :
"blah.foo(blah.ggg)"
how can i know with regexp that i have duplication of "blah"?