UK Bank Sort Code Regular Expression

Category: Numbers

A regular expression to match a UK Bank Sort Codes, which consists of a six-digit number formatted as 12-34-56.

/^[0-9]{2}[-][0-9]{2}[-][0-9]{2}$/

Matches

  • 12-23-43

Non-matches:

  • 12-2345
  • 12-23-456
  • 123456
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.