http://www.perlmonks.org?node_id=1028380

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

1) some text 2) 1. some text 2. 1) some text 2. 1. 2.10.10.20 some text 2. 1) 2.10.10.20 2)
i want to get the text between 1) and 2) or 1. or 2. , here is what i have written  1[)|.](.*?)2[)|.] so here in perl $1 will give me the text between , but this will fail in the third match (  1. 2.10.10.20 some text 2.) so can some one please help me in setting up the regexp.