Regex To Match Anything After The First Space In A String

Category: Strings

A regular expression to match anything after the first space in a string. Can be useful in replacing all characters that follow the first space.

/\s(.*)/g

Matches:

  • Regex Pattern
  • Regex Pattern Com
  • Regex Pattern.Com!

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.