Thanks!$ cat tmp |90|93|foo|bar|91|92|95|96|906| $ perl -pe 's{\|9[0-6]+?\|}{|X|}g' tmp |X|93|foo|bar|X|92|X|96|X| $ perl -pe 's{\|9[0-6](?=\|)}{|X}g' tmp |X|X|foo|bar|X|X|X|X|906|
-peter
In reply to Re: Replacing consecutive tokens in 1 pass
by aarestad
in thread Replacing consecutive tokens in 1 pass
by aarestad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |