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

$line =~ /^1[.)](.*)2[.)]$/;

Is that what you meant?