s/\t(?=[\t\n])/\t\\N/g;
But this type of simple regex doesn't handle quoted values that contain adjacent tabs, of course.
To also handle the first field being empty:
s/(^|\t)(?=[\t\n])/$1\\N/g;
- tye
In reply to Re: Regexp: Overlapping matches (?=)
by tye
in thread Regexp: Overlapping matches
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |