Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a Regex for Kuwait Mobile number in international format

Tags:

regex

I need a regex to match following:

  • total string length 12
  • first four characters must be +965
  • fifth character either 5, 6 or 9
  • followed by 7 digits [0-9]
  • nothing else allowed

Any help regarding this shall be highly appreciated.

like image 424
Amer Hamid Avatar asked Dec 06 '25 21:12

Amer Hamid


1 Answers

Based on help extended by Pranav and Tim, the regex for kuwait mobile is +965[569]\d{7}$

working fine with simfatic forms. Thanx for the help.

like image 88
Amer Hamid Avatar answered Dec 08 '25 14:12

Amer Hamid