in reply to Re: substitute space to 0
in thread substitute space to 0

s/\t(?=\t)/\t0/g

Unfortunately, that regex doesn't work with other of the OPed example data strings that have leading and/or trailing tabs, e.g., "4\t4\t4\t\t\t4\t\t\t\t3\t" and "\t\t4\t4\t\t\t1\t\t\t\t". (It took me a while, but I finally figured out that all that whitespace was due to tab characters. I suspect that yueli711 changed the posted example data, too. Oh, well... :)


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: substitute space to 0
by kcott (Archbishop) on Aug 19, 2018 at 10:41 UTC

    G'day AnomalousMonk,

    ++ Thanks for advising of that problem. I've updated my post.

    — Ken