PHP regex for Lebanese phone number
I'm sure there's a slicker way to do it, but
^(961(3|70|71)|(03|70|71))\d{6}$
seems to work, assuming I understand the requirements.
^((961)?(7(0|1))|(961|0)3)[0-9]{6}$
It's a composition of these three regexes:
(961)?(7(0|1)) // 70 and 71 prefixes
(961|0)3 // (0)3 prefix
[0-9]{6} // main number
Allowing for spaces or common separator chars (though I know you said you weren't concerned about them):
^((961[\s+-]*(3|7(0|1)))|(03|7(0|1)))[\s+-]*\d{6}$
http://regexr.com?2t89v