Subject: DocOZ Clip: 10-lbs gone in 10-days

From: Put Away Your Dumbbells <[email-masked]>
Date: Mon, 11 Aug 2014 11:57:05 -0700

This DocOz Tip puts Skinny Jeans in your near Future
Episode Recap: 501

Daily Oz Tip:

1. Put Down the Dumbbells
2. Stop Counting Calories
3. See DocOz Secret -> http://www.beneathami.com/episode/clip/recap.video

You'll be sizzling hot in days... And without breaking a sweat.

[Daily OzTip]

-
-
Stop End further correspondence - write Daily Updated Alerts
9306 BOVA CT- Louisville, KY 40291 or visit http://www.beneathami.com/2oiof/wmkfit/w3md.sjmf
-
-
-
The original problem is trying to handle phone number validation because it was trying to handle all the possible formatting options. Rather than try to solve all that, take the input and "pre-strip" it of all formatting fluff until you have just the "number". Doing this solves 2 problems - testing the result is now easy and you can now ensure that values rendered back out for display can all be formatted consistently. The first comment on this answer about the "Complicator's Gloves" is a good read... sometimes the answer to a problem is to approach it differently.  There are two problems here, creating output from what a user typed in, that ends up looking like a phone number, which this kind of solves, and determining if what a user typed in, is in fact a valid phone number, which this does not solve at all. If you want validation, i.e. determining if a string is a valid phone number, this doesn't do that. The questions asks about validation, not formatting. Of course the author of
  the question is the final arbiter, but the question, as asked is not answered by this answer. did you read the article linked in the first comment added by Nicholas Trandem the Original Question Poster? Sometimes (as you can see how the community has voted) even though there is a solution to use a 261 character regex that handles a bunch of scenarios... trying to attack the problem in a different manner is actually the answer you want. Note Dave Kirby's answer also suggests not using a strict regex... also gaining