A regular expression to match all characters in a string except space (unless in quotes).
It is useful for developers to split a string into an array.
/\w+|"[\w\s]*"/
Matches:
- Anything but space (unless in quotes)
See Also:
- Regex To Match Any Word In A String Excluding Spaces
- Regular Expression To Match Whitespace
- Regex To Match Words With No Digits
- Regex To Match Everything Except Letters And Spaces