module Gemmy::Patches::StringPatch::InstanceMethods::EachMatch

Public Instance Methods

each_match(re) { || ... } click to toggle source

facets iterator over matches from regex

# File lib/gemmy/patches/string_patch.rb, line 143
def each_match(re) #:yield:
  if block_given?
    scan(re) { yield($~) }
  else
    m = []
    scan(re) { m << $~ }
    m
  end
end