method

matched?

v1_8_6_287 - Show latest stable - Class: StringScanner
matched?()
public

Returns true iff the last match was successful.

  s = StringScanner.new('test string')
  s.match?(/\w+/)     # => 4
  s.matched?          # => true
  s.match?(/\d+/)     # => nil
  s.matched?          # => false