From 769ad665ddfa40c975dcdd50fd9302230023682b Mon Sep 17 00:00:00 2001 From: Cayla Horsey Date: Tue, 9 Jul 2024 15:12:50 -0400 Subject: [PATCH] Pass all tests --- lib/regex_lab.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/regex_lab.rb b/lib/regex_lab.rb index 60552abf..05660959 100644 --- a/lib/regex_lab.rb +++ b/lib/regex_lab.rb @@ -1,19 +1,19 @@ def starts_with_a_vowel?(word) - + !!word.match(/^[aeiouAEIOU]/) end def words_starting_with_un_and_ending_with_ing(text) - + text.scan(/\bun\w*ing\b/) end def words_five_letters_long(text) - + text.scan(/\b\w{5}\b/) end def first_word_capitalized_and_ends_with_punctuation?(text) - + !!text.match(/^[A-Z].*[.!?]$/) end -def valid_phone_number?(phone) - +def valid_phone_number?(number) + !!number.match(/\A(\(?\d{3}\)?[\s\-]?\d{3}[\s\-]?\d{4})\z/) end