I'm looking for a regex which will help me do this.. $string = 'google.com/?q=test';
$pattern_match = 'google|yahoo|msn'; What I would like to do is test if $string contains one of the patterns in the pattern match and then carry out a function based upon which pattern is matched... e.g. if ($string =~ /$pattern_match/i) { my $matched_pattern = ####???? ($_?) } Any ideas? sorry for being slightly not mod perl specific... ___________________________________________________________ Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html