in reply to How do I extract all text around a keyword between two symbols?

I'm no regex master, but if it were me I'd do it in two stages:

for ($text =~ /<tr>(.*?)<\/tr>/gmsi){ $selected=$1; if ($selected =~ /ISTF/is) { $selected_text = $1 ; ## Your code here } }

andre germain
"Wherever you go, there you are."

  • Comment on Re: How do I extract all text around a keyword between two symbols?
  • Download Code