0

When using regular expressions in Python, is there any difference between '[^ ]*' and '\S*'? Don't they both mean "match zero or more non-whitespace characters"?

Blair Nangle
  • 140
  • 10
  • 3
    tab/cr/lf and more are also considered whitespace by \s and \S whereas your character class only considers `" "` to match. – Alex K. Nov 05 '15 at 15:07
  • It is not hard to visit [regex101.com](http://regex101.com) and check yourself. Pattern description on the right is usually quite comprehensive. – Wiktor Stribiżew Nov 05 '15 at 15:09

0 Answers0