From a1ae5c98517dd664a100e54a6b62a89c344c52ce Mon Sep 17 00:00:00 2001 From: SamuelWorld20 Date: Fri, 3 Nov 2023 13:51:22 -0700 Subject: [PATCH] fixed error in match School --- 0x06-regular_expressions/0-simply_match_school.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/0x06-regular_expressions/0-simply_match_school.rb b/0x06-regular_expressions/0-simply_match_school.rb index 23224a4..98455f8 100755 --- a/0x06-regular_expressions/0-simply_match_school.rb +++ b/0x06-regular_expressions/0-simply_match_school.rb @@ -1,11 +1,3 @@ #!/usr/bin/env ruby # This regular expression must match School -regex = /School/ - -match = ARGV[0].match(regex) - -if match - puts match[0] -else - puts '' -end +puts ARGV[0].scan(/School/).join