Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: multiple OR match fails

by InfiniteSilence (Curate)
on Jan 31, 2012 at 03:16 UTC ( #950867=note: print w/replies, xml ) Need Help??


in reply to multiple OR match fails

Would have been nice to include at least some piece of your input file. Your regex looks like it is missing some parentheses or something. Also, if your code is so short you might consider one-lining it:

~linux> perl -ne 'if(m/((FINDINGS|COMPLICATIONS):(.*?)([A-Z]+))/sgm){p +rint qq|$2$3\t$4\n|};' foo7.txt

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re^2: multiple OR match fails
by ikegami (Pope) on Jan 31, 2012 at 06:16 UTC
    if (//g) should be while (//g).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2016-09-30 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (571 votes). Check out past polls.