Whitespace in regular expressions

Worker

Member³
Trying to find text that matches a regular expression that uses whitespace doesn't work correctly.
  • " " does not match anything
  • " $" matches the end of the first line
  • "[ ]$" gives "Unexpected end of expression
The same thing happens when using a (pasted) tab character instead of a space.

Using "\ " rather than just " " resolves the problem.
 
Back
Top