in reply to Re^3: matching multiple words within multiple lines in a file
in thread matching multiple words within multiple lines in a file
Now - I wanted to write a PERL code to know if the string 'abc', 'dfsdf' , 'nop' and 'fdsfs' in line #5 exist between '{' and '}'. I am not able to figure out how to write the code to implement this. In case of the text file provided above, the result should be something printed likeabc dsdasd dasgg gfg htrh sdsjk sdasd ds { abc deef gheweri rew jk \ dfs grg gre ret rtr lm nop qrs\ erwe erewr gf htrh ksdj \} -fdj lf erew fsdfj kgfk -bg1 abc dfsdf -bg2 nop fdsfs
'abc' and 'nop' are present above
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: matching multiple words within multiple lines in a file
by Corion (Patriarch) on Dec 02, 2014 at 09:51 UTC |