#!/usr/bin/perl use strict; use warnings; my $html = q~~; my @text = $html =~ /return\s*escape\('(.*?)'\)/isg; print $_,"\n" for @text;