in reply to regular expression for getting text between 1. and 2.

I recommend Regexp::Debugger, it's a great tool! Here's video on its usage, but it's actually this simple:

rxrx prog_with_regexp.pl

Well done is better than well said. -- Benjamin Franklin