Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Java 8

"
^(0[1-9]|[1-7][0-9]|8[0-1])(([A-PR-VYZ]{1})(?!0{4,5}$)\d{4,5}|([A-PR-VYZ]{2})(?!0{3,4}$)\d{3,4}|([A-PR-VYZ]{3})(?!0{2,3}$)\d{2,3})$
"
gm

Description

Gist link for Java : https://gist.github.com/Gencturk-m/9962ce1e1dcf4dd9307062e34b023183

Aşağıdaki yapıdaki plakaları kabul eder:

"01-81 X 9999", "01-81 X 99999"

"01-81 XX 999", "01-81 XX 9999"

"01-81 XXX 99" "01-81 XXX 999"

**X: Türkçe'nin ÖÇŞİĞÜ hariç büyük harfleri. **Harfler ve sayılar arasında boşluk olmadan kabul eder. Boşluklu versiyonu gist linkinde var. **00, 000, 0000 ve 00000 ile bitenleri kabul etmez.

**X: Turkish Capital Letters except ÖÇŞİĞÜ. **There is no white-space between letters and numbers. White-space version is in gist link. **Does not accept plates that ends with 00, 000, 0000 and 00000.

Submitted by Melih Gençtürk - https://github.com/gencturk-m - 2 years ago