match(tag, advance = true) {
    const [regExp, length] = this.prepareRegExp(tag);
    const matched = regExp.test(this.text.substr(this.position, length));

    if (matched && advance) {
      this.position += length - 1;
    }

    return matched;
  }
@param {string|RegExp} tag
@param {number} [advance] if set, advance current position in text
@returns {boolean} true if match at given position, false otherwise
@private