Skip to content

Instantly share code, notes, and snippets.

View berkai's full-sized avatar
🎯
Focusing

Berkay Berkman berkai

🎯
Focusing
View GitHub Profile
@berkai
berkai / tr_license_plates.py
Created August 9, 2019 08:23
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
]