while(<DATA>) { chomp; if (/^1[.)](.*?)2[.)]$/) { print"matched $1\n"; } else{ print "not matched \n"; } } __DATA__ 1. 2.10.10.20 some text 2. 1) 2.10.10.20 2)
In reply to Re: regular expression for getting text between 1. and 2.
by prashantktyagi
in thread regular expression for getting text between 1. and 2.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |