Pattern Matching Function (Ruby)
def hilite_search_criteria(pattern, search_criteria) return if pattern.nil? or search_criteria.nil? pattern.gsub!(/(]*>)|\n|\t/s) {” “} match_char = pattern =~ /#{search_criteria}/i matched_string = $~.to_s return…
Achieving Developer Excellence with Automated Testing
def hilite_search_criteria(pattern, search_criteria) return if pattern.nil? or search_criteria.nil? pattern.gsub!(/(]*>)|\n|\t/s) {” “} match_char = pattern =~ /#{search_criteria}/i matched_string = $~.to_s return…