in reply to Re: Pattern Matching, left-to-right
in thread Pattern Matching, left-to-right
fun with perl:
Note: s modifier is required in the regexpsubstr($_, pos() - 3, 3) =~ tr/FSTRE\\/|^&~\\/d while m/\G.*?\\[FSTRE]\\/gs;
Update: regexp was simplified
substr($_, pos() - 3, 3) =~ tr/FSTRE\\/|^&~\\/d while m/\\[FSTRE]\\/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Pattern Matching, left-to-right
by Aristotle (Chancellor) on Aug 22, 2004 at 09:07 UTC |