Kasi ramanathen wrote: > $str='<a > href="Java.Sun.com'">http://srd.yahoo.com/S=2766679:WS1/R=1/K=java/SS=79 559/OCS=79428/H=0/T=1043090181/F=641685fa5455462d4f69450a6fd72ecc/*http: //java.sun.com/"><b>Java</b>.Sun.com</a></big>'; > if($str=~/<a href=[\w\W]*>[\w\W]*<(\W)/) { > print $1; > print "\n***\n"; > } >
It's very hard to see where your regex starts and ends. To put slashes within a regular expression use a pair of characters that don't appear in the expression: /regex/ is the same as m[regex] Also remember that you need to escape 'metacharacters' like dot and star. Put a backslash before them like this: m[srd\.yahoo\.com] Try these things and see how you get on. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]