How will \s+ match an empty string? The plus means "match one or more", the \s means "whitespace characters". An empty string has no whitespace characters to match, because it has no characters at all.
In reply to Re^2: The "anchor" misnomer in regexes
by Anonymous Monk
in thread The "anchor" misnomer in regexes
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |