How to create a regex that will match an arbitrary sequence of spaces and tabs
\s+
should capture all whitespace, including spaces, tabs, carriage returns, and some weird whitespace characters. Use \s*
if you want it to be optional.
[ \t]+
will match arbitrary sequences (e.g., spaces followed by tabs followed by more spaces ...).