module MatchRegex

Constants

VERSION

Public Instance Methods

match_regex(text, regex) click to toggle source
# File lib/match_regex.rb, line 4
def match_regex(text, regex)
  text.to_s[Regexp.new(regex), 1]
end