my $s = "012345678901234567890123456789"; print $s, "\n"; $i=0; $s =~ s/(\d{5})/$1.(++$i==3 && "<BR>" or $i!=6 && "-")/ge; print $s, "\n";
In reply to Re: A regex question...
by fletcher_the_dog
in thread A regex question...
by thezip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |