my $data = "this is a line of code this is where I wax poetic about my code this is another example of code"; if ($data =~ /(.*)<\/tag>/s) { print "I found =>$1<=\n"; }