How about this?
while(/\t/g){ s/\t/$-[0]%4?" "x(4-$-[0]%4):" "x4/e; } [download]
In reply to Re: regex'ing source code by monsoon in thread regex'ing source code by zuma53