A regular expression to match the first whitespace found in a term or sentence (exclude newlines).
/[^\S\r\n]/
Matches:
- Regex [WHITESPACE] Pattern
- Regex [WHITESPACE] Pattern [SECOND WHITESPACE] COM
Non-matches:
- All other whitespaces except the first one.
See Also:
- Regular Expressions For New Line
- Regex To Match All Whitespace Except New Line
- Regex Match All Characters Except Space (Unless In Quotes)
- Regex To Match Any Word In A String Excluding Spaces
- Regex To Match Spaces And Empty Lines That Aren’t In Quotes
- Regex To Match Two Characters Surrounding A Single Space
- Regex To Match A String With No Whitespace At The Beginning And End
- Regex To Remove Unnecessary Spaces In A String