Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help in creating a certain regular expression 1

Status
Not open for further replies.

thelordoftherings

Programmer
May 16, 2004
616
IL
Hello,

I need to validate a certain String, it suppose to be a cellular number at this format: <prefix>-<number>
the <prefix> can be "052", "054", "050" and "057" only.
the <number> should contain excactly 7 digits, it must be 7 and must be digits.
A legal number for example: 052-2285698
Can anyone please help me acheive this using regular expressions?

Regards,
Roy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top