This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# INSTRUCTIONS: | |
# 1. Review the tests on lines 21 and 24. | |
# 2. Replace the placeholder RegEx on line 18 with one that would pass these tests. | |
# 3. Use the shell command 'irb phone_regex.rb' (no quotation marks) to evaluate this entire file. | |
# 4. If successful, repeat these steps to pass the tests on line 41, modifying your original RegEx as necessary. | |
# Part 1: Creating a regular expression for phone numbers | |
# --------------------------- | |
# Valid phone numbers | |
phone_pass = ['4123456789', '412-456-7890', '412.456.7890', '(412) 345-6789', '412 345-6789'] |