perl -e '$l="|i ba |l L1 |i b2 |l L2"; while ($l=~ /\|i([^|]*).*\|l([^ +|]*)/g) {print "$1 $2\n"}' ba L2 perl -e '$l="|i ba |l L1 |i b2 |l L2"; while ($l=~ /\|i([^|]*).*?\|l([ +^|]*)/g) {print "$1 $2\n"}' ba L1 b2 L2
Cheers,
R.
In reply to Re: execute loop code for every occurence of regex
by Random_Walk
in thread execute loop code for every occurence of regex
by aquarium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |