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

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

by chromatic (Archbishop)
on Apr 14, 2000 at 19:41 UTC ( [id://7636]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($text =~ /\bstart\b(.*?)\bend\b/) {
        $result = $1;
        # do something with results
    }
    
  2. or download this
    sub between {
        my $text = shift;
        if ($text =~ /start(.*?)end/) {
    ...
            return $text;
        }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found