in reply to How to get the Pre-Match and Post-Match through Win32::OLE

prasadbabu uses $pre= $`;$post= $'; that is bad for the performance for your script, because it slows down the regex-engine.
$gubes code can be optimized, no need for unpack():
$str='This is Sample Pre Match Text<web>www.hotmail.com</web>This is S +ample Post Match Text'; ($pre,$post)=$str =~ m#(.{1,15})<web>.*</web>(.{1,15})#gsi; print "\n$pre"; print "\n$post"


holli, /regexed monk/