Skip to content

Instantly share code, notes, and snippets.

@justindmyers
Last active August 10, 2018 14:21
Show Gist options
  • Save justindmyers/1ced561b97bf8bb6a2ab to your computer and use it in GitHub Desktop.
Save justindmyers/1ced561b97bf8bb6a2ab to your computer and use it in GitHub Desktop.
Hard to find regex
# CURP
/\A[A-Z][AEIOUX][A-Z]{2}[0-9]{2}[0-1][0-9][0-3][0-9][MH][A-Z][BCDFGHJKLMNÑPQRSTVWXYZ]{4}[0-9A-Z][0-9]\z/i
# RFC
/\A[A-ZÑ&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9]([A-Z0-9]{3})?\z/i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment