Skip to content

Instantly share code, notes, and snippets.

@berkai
Created August 9, 2019 08:23
Show Gist options
  • Save berkai/b156623bbaf5c1f0f963464c502d6b00 to your computer and use it in GitHub Desktop.
Save berkai/b156623bbaf5c1f0f963464c502d6b00 to your computer and use it in GitHub Desktop.
Regex for Turkish License Plate Templates / Türkiye Plaka Kodu İçin Regex
#Regex for turkish license plate, you can try it here: https://regex101.com/
TEMPLATES = [
r'\b\d{2}.{0,1}[^\d\W]{0,1}.{0,1}\b\d{4,5}\b', #99 X 9999, 99 X 99999
r'\b\d{2}.{0,1}[^\d\W]{0,1}.{0,1}\b[^\d\W]{0,1}.{0,1}\b\d{3,4}\b', #99 XX 999, 99 XX 9999
r'\b\d{2}.{0,1}[^\d\W]{0,1}.{0,1}\b[^\d\W]{0,1}.{0,1}\w{0,1}.{0,1}\b\d{2,3}\b' #99 XXX 99, 99 XXX 999
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment