regular expression confusion \s and " "
regex
Solution
The \s character class matches all "whitespace characters," not just spaces. This includes tabs (\t), and if multiline matching is allowed, it includes carriage return (\r) and newline (\n). Theoretically, if your regular expression engine handles unicode, there are also unicode whitespace characters that \s can match, though your mileage may vary.
So with a string like "a\t b", you can match it with the regex /a\s+b/, in case that is useful to you.
Problem
In regular expression, i know when use \s to represent a space, but, in following case, would they be different: - /a\sb/ ---with a \s - /a b/ ---with empty field thanks a lot if you can explain to me.