Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Answer: How do I extract all text between two keywords like start and end?

( #12070=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How do I extract all text between two keywords like start and end? contributed by Punto

($content) = $string =~ m/ start (.*) end /;
That will get the stuff between " start " and " end " into $content.

Comment on Answer: How do I extract all text between two keywords like start and end?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (17)
As of 2015-03-27 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (612 votes), past polls