Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Regxp: signaling when to stop

by Zaxo (Archbishop)
on Jun 20, 2007 at 15:09 UTC ( [id://622277]=note: print w/replies, xml ) Need Help??


in reply to Regxp: signaling when to stop

If your idea is sufficient, here's how to do it:

my ($name) = m/sequence (.*?) consists/i;
assuming that $_ contains the line you're parsing. If whitespace is inconsistent, you can canonicalize it with,
$_ = join ' ', split;
before applying the match.

After Compline,
Zaxo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found