Skip to content

Instantly share code, notes, and snippets.

@faim87
Last active October 6, 2024 09:36
Show Gist options
  • Save faim87/d4c418ec01a925ceee8bd5b7cc400ef9 to your computer and use it in GitHub Desktop.
Save faim87/d4c418ec01a925ceee8bd5b7cc400ef9 to your computer and use it in GitHub Desktop.
Uzbekistan phone codes - regex pattern.

Mobile = /^9989[012345789][0-9]{7}$/

All = /^998(9[012345789]|6[125679]|7[01234569])[0-9]{7}$/

@islomabdullaev
Copy link

https://regex101.com/r/VFJ3wv/1

^+?998?\s?-?(90|91|93|94|95|98|99|33|97|71)\s?-?(\d{3})\s?-?(\d{2})\s?-?(\d{2})$

XXX-XX-XXX-XX-XX
XXX XX XXX XX XX
XXX XX-XXX-XX XX
...

regex

sign plus doesn't matter +998902641905 998903641905

if u wanna contact me, ↑ :) [ smiley face ]

It didnt work with + sign here I updated your code:
^+?(998|90)?\s?-?(90|91|93|94|95|98|99|33|97|71)\s?-?(\d{3})\s?-?(\d{2})\s?-?(\d{2})$

@ilhom95055
Copy link

ilhom95055 commented Oct 6, 2024

bu holatda faqat 9 bilan boshlangan kodlarda ishlaydi va + talab qilmaydi
/^[+]{1}998[1-9]{2}[0-9]{7}$/ mana shu variantni taklif qilaman

+998948007117

[
[
{
"content": "+998948007117",
"isParticipating": true,
"groupNum": 0,
"startPos": 0,
"endPos": 13
}
]
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment