in reply to Re: A regex question...
in thread A regex question...
s/\d{5}(?!$)/$& . (++$i%3?'-':'<br>')/eg
Is probably slightly more generic that $i!=6 :)
(edit: string of 30 digits! $i!=6 is fine)
But I prefer:
$s =~ s/\B/ !(++$i%15) && '<br>' || !($i%5) && '-' /eg;
Jasper