# -> Match
#
# ------------------------------------------------------------------------------
- # Method to iterate through a sequence to locate pattern matches starting from a
- # given position and allowing for a maximum edit distance. Matches found in
- # block context return the Match object. Otherwise matches are returned in an
- # Array.
+ # Method to iterate through a sequence to locate the first pattern match
+ # starting from a given position and allowing for a maximum edit distance.
def patmatch(pattern, pos = 0, max_edit_distance = 0)
self.patscan(pattern, pos, max_edit_distance) do |m|
return m