Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: regular expression for getting text between 1. and 2.

by prashantktyagi (Scribe)
on Apr 12, 2013 at 14:41 UTC ( #1028386=note: print w/ replies, xml ) Need Help??


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

check this

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)


Comment on Re: regular expression for getting text between 1. and 2.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028386]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-10-30 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (211 votes), past polls