Regex To Match Two Characters Surrounding A Single Space

Category: Strings

A Regular Expression to match two characters surrounding a single space, with support for enforcing a minimum and maximum number of characters (2-5 characters in this regex).



  • a b c d e c d e
  • a b 
  • regexpattern


  • regex pattern
  • regexpattern com

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.