Regex To Match Words That Start With A Specific Character

Category: Strings

A regular expression to match all words that start with a specific character (e.g. #, @, etc) in a string.

Note that don’t forget to replace the P in the regex with your own character.



  • Prefix
  • Pattern
  • Putty


  • prefix
  • patternP
  • 12345

See Also:

Rate This Regex
User Review
0 (0 votes)

Expression Flags

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