method

match

v1_9_3_392 - Show latest stable - Class: REXML::IOSource
match( pattern, cons=false )
public

No documentation available.

# File lib/rexml/source.rb, line 209
    def match( pattern, cons=false )
      rv = pattern.match(@buffer)
      @buffer = $' if cons and rv
      while !rv and @source
        begin
          @buffer << readline
          rv = pattern.match(@buffer)
          @buffer = $' if cons and rv
        rescue
          @source = nil
        end
      end
      rv.taint
      rv
    end