Last active
March 21, 2024 12:20
-
-
Save semihkeskindev/116a3bb09b657212ddb3d56770c5a0c3 to your computer and use it in GitHub Desktop.
TR Turkey Turkish Phone Regex advanced
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 3. satırı baştan sona kopyalamanız gerekmektedir. Çalışır örneğini 5. satırdaki linkten görebilirsiniz. | |
/(^[0\s]?[\s]?)([(]?)([5])([0-9]{2})([)]?)([\s]?)([0-9]{3})([\s]?)([0-9]{2})([\s]?)([0-9]{2})$/g | |
// https://regexr.com/5005l |
This one is shorter: /^(05)[0-9][0-9][\s]([0-9]){3}[\s]([0-9]){2}[\s]([0-9]){2}/
.
^(\+90|0)?\s*(\(\d{3}\)[\s-]*\d{3}[\s-]*\d{2}[\s-]*\d{2}|\(\d{3}\)[\s-]*\d{3}[\s-]*\d{4}|\(\d{3}\)[\s-]*\d{7}|\d{3}[\s-]*\d{3}[\s-]*\d{4}|\d{3}[\s-]*\d{3}[\s-]*\d{2}[\s-]*\d{2})$
Her bir örnek, +90 veya 0 ile başlayabilir ve bu örneklerle birleştirilebilir.
(ddd)ddd-dd-dd
(ddd)ddd-dddd
(ddd)ddddddd
(ddd) ddd-dd-dd
(ddd) ddd-dddd
(ddd) ddddddd
(ddd)ddd dd dd
(ddd)ddd dddd
(ddd)ddddddd
(ddd) ddd dd dd
(ddd) ddd dddd
(ddd) ddddddd
(ddd)-ddd-dd-dd
(ddd)-ddd-dddd
(ddd)-ddddddd
(ddd) -ddd-dd-dd
(ddd) -ddd-dddd
(ddd) -ddddddd
ddd-ddd-dd-dd
ddd-ddd-dddd
ddd ddd-dd-dd
ddd ddd-dddd
ddd-ddd dd dd
ddd-ddd dddd
ddd ddd dd dd
ddd ddd dddd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
genellikle 5'le başlayan telefon numarası inputu görürüz. (0 ile değil)
bunun için de:
/([(]?)([5])([0-9]{2})([)]?)([\s]?)([0-9]{3})([\s]?)([0-9]{2})([\s]?)([0-9]{2})$/g