Skip to content

Instantly share code, notes, and snippets.

@Comfie
Forked from jamesdube/regex.txt
Created December 9, 2021 19:35
Show Gist options
  • Save Comfie/5c2438c84b045d82563d6ee3d0a6ac4b to your computer and use it in GitHub Desktop.
Save Comfie/5c2438c84b045d82563d6ee3d0a6ac4b to your computer and use it in GitHub Desktop.
Zimbabwe National ID Regex
# 00000000X00
/([0-9]{8,9}[a-z,A-Z][0-9]{2})/g
# 00-000000-X-00 dashes are optional
/([0-9]{2}-?[0-9]{6,7}-?[a-z,A-Z]-?[0-9]{2})/g
# 00-000000 X00 dash is required, space before letter is optional
/([0-9]{2}-[0-9]{6,7}\s?[a-z,A-Z][0-9]{2})/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment