I have a text file that contains many sections. I want to extract certain sections with associated content. Why the code below when finds the first matched section (Findings) stops looking for the other section (Complications)? If I add more sections to the OR list, it only finds the first match and ignores the rest. Really apprecite your wisdom!
.... ..... while(<IN>) { undef ($/); $string=$_; $string =~m/(FINDINGS|COMPLICATIONS|(:)(.*?)(^[A-Z])/sgm; print "processing $file\n"; print OUT "$1$2\t$3"; }exit; .... ......
In reply to multiple OR match fails by zzgulu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |