putnik has asked for the wisdom of the Perl Monks concerning the following question:
"\n" and "." doesn't matter (so I can't split it into many lines and process separately). line numbers just for reference, and real data may mix 1st and 2nd type of lines in random way.1stline....pattern1.......pattern1..... 2ndline....pattern1.....pattern2...pattern1... 1a line....pattern1.......pattern1..... 2a line....pattern1........pattern2...pattern1.....
I realize I should do it with1stline....pattern1.......pattern1..... 2ndline....subst... 1a line....pattern1.......pattern1..... 2a line....subst.....
and so on.pattern1([^p][^a][^t]...[^1])*?pattern2([^p][^a][^t]...[^1])*?pattern1 pattern1.(pattern1){0}*?pattern2.(pattern1){0}*?pattern1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I build regexp with "not" assertion?
by Erez (Priest) on Feb 17, 2008 at 14:20 UTC | |
by putnik (Novice) on Feb 17, 2008 at 19:10 UTC | |
|
Re: How can I build regexp with "not" assertion?
by parv (Parson) on Feb 17, 2008 at 12:58 UTC | |
by putnik (Novice) on Feb 17, 2008 at 17:36 UTC | |
|
Re: How can I build regexp with "not" assertion?
by johngg (Canon) on Feb 17, 2008 at 17:47 UTC | |
|
Re: How can I build regexp with "not" assertion?
by ikegami (Patriarch) on Feb 17, 2008 at 18:29 UTC | |
by putnik (Novice) on Feb 22, 2008 at 14:09 UTC | |
|
Re: How can I build regexp with "not" assertion?
by nikhil.patil (Sexton) on Feb 18, 2008 at 07:00 UTC | |
by putnik (Novice) on Feb 22, 2008 at 14:15 UTC |