Indian Postal/Pin/Zip Code Regular Expression

A regular expression to match Postal/Pin/Zip codes in India, which consists of a 6-digit number with or without spaces.

/^\d{3}\s?\d{3}$/

Matches

  • 300500
  • 300 500

Non-matches:

  • 12345
  • 12 345
  • abcdef

See Also: