A regular expression to match any word in a string until meeting spaces.
/([^\s]+)/
Matches:
- This Is Word
Non-matches:
- Any spaces found in a string
See Also:
- Regex Match All Characters Except Space (Unless In Quotes)
- Regular Expression To Match Whitespace
- Regex To Match Spaces And Empty Lines That Aren’t In Quotes