You also can't use 'x' mode to ignore whitespace in the replacement part. I also fixed that.use strict; $_ = "|90|93|foo|bar|91|92|95|96|906|"; s{ \|9 [0-6]+ (?=\|) } {|X}xg; print $_,"\n";
In reply to Re: Re: Replacing consecutive tokens in 1 pass
by tall_man
in thread Replacing consecutive tokens in 1 pass
by aarestad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |