in reply to Find text between two strings?
It could be something like this (precise form of regex depends on the interpretation of your question, please read the link):
my $input = "foodogbar"; my ($thing) = $input =~ /foo(.*?)bar/; [download]