hello
i'm having a little trouble getting my regular expression to work properly. Basically, i just want to search thru a line of text to see if it matches the contents of a variable, like so:
if($tring =~ /$compare/)
{
print "whoppee!!";
}
only there are 2 problems:
1. either string may be either lowercase or uppercase.
2. $compare may occur anywhere in $tring.
so i just need 3 pieces of info: an upper/lowercase function, an inexact pattern matching expression (is that m// ???) and if i'm using the if statement above correct.
(as yo can tell, my knowledge of regular expressions/pattern matching is patchy to say the least. nyone know a good tutorial??
)
Thanx in advance
TheSaltyDuke
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
i'm having a little trouble getting my regular expression to work properly. Basically, i just want to search thru a line of text to see if it matches the contents of a variable, like so:
if($tring =~ /$compare/)
{
print "whoppee!!";
}
only there are 2 problems:
1. either string may be either lowercase or uppercase.
2. $compare may occur anywhere in $tring.
so i just need 3 pieces of info: an upper/lowercase function, an inexact pattern matching expression (is that m// ???) and if i'm using the if statement above correct.
(as yo can tell, my knowledge of regular expressions/pattern matching is patchy to say the least. nyone know a good tutorial??
Thanx in advance
TheSaltyDuke
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)