Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

John444

macrumors member
Original poster
Feb 10, 2011
90
0
I am having trouble learning regex!
I cannot seem to get the right php regex to validate that an email that is in the form (xxx) xxx-xxxx

I know the javascript regex is /\(\d{3}\) \d{3}\-\d{4}/ but what is the php regex?

If anyone can give me the regex for this it would be appreciated
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.