whitespace in regular expression
\t is not equivalent to \s+, but \s+ should match a tab (\t). The problem in your example is that the second pattern \s\s+ is looking for two or more whitespace characters, and \t is only one whitespace character. Here are some examples that should help you understand: \s\s+ would also match ‘ \t’, ‘\n\t’, ‘ \n \t \t\n’. Also, \s\s* is equivalent to \s+. Both will match one or more whitespace … Read more