Braces ({}) specifies the exact number of digits, such as \d{3} or \d{4}
phone = "(555)123-4567" phone.grep(/[\(\d{3}\)]?\d{3}-\d{4}/)# => ["(555)123-4567"]