# File nqxml/tokenizer.rb, line 205
 def textUpTo(str, strIsRegex, errorIfNotFound)
	    while @currInput.pos >= @currInput.length
		@inputStack.pop()
		@currInput = @inputStack.last
	    end

	    if strIsRegex
		textEnd = (str =~ @currInput.string[@currInput.pos .. -1])
		textEnd += @currInput.pos if textEnd
	    else
		textEnd = @currInput.string.index(str, @currInput.pos)
	    end

	    # Throw error here if no char found and if errorIfNotFound is
	    # true.
	    if textEnd.nil?
		if errorIfNotFound
		    raise ParserError.new("unexpected EOF: missing #{str}",
					  self)
		end
		textEnd = @currInput.length
	    end

	    range = (@currInput.pos ... textEnd)
	    text = @currInput.string[range]
	    skipChars(text.length)
	    return text
	end