30 Days of JavaScript: Regular Expressions in JavaScript, Day 9

You’ve written the loop before. Check whether a string holds a phone number, then a second pass for the dashes, then