The length of a tab is not defined across applications, so it is not necessarily the same size as 8 spaces. A tab is a single character, usually expressed in most programming languages as
"\t".
There are several characters which could come under the heading "white-space", that includes tabs and spaces, but also new-lines
"\n", carriage-returns
"\r", form-feeds
"\f" and sometimes more. If you wish to include
all white-space in you regular expression then use the \s short-cut as described by
Nikhil Jain, otherwise just use
s/\t/,/g. I'm guessing that
I don't want to replace a single character character or any non tab space with comma means you need \t, not \s.