Clean out elements whose id/class combinations match specific string.

@param Element
@param RegExp match id/class combination.
@return void
760781
function(e, regex) {
    var endOfSearchMarkerNode = this._getNextNode(e, true);
    var next = this._getNextNode(e);
    while (next && next != endOfSearchMarkerNode) {
      if (regex.test(next.className + " " + next.id)) {
        next = this._removeAndGetNext(next);
      } else {
        next = this._getNextNode(next);
      }
    }
  }
352485
public void addRegExp(RegExpLiteral re) {
        if (re == null) codeBug();
        if (regexps == null)
            regexps = new ArrayList<RegExpLiteral>();
        regexps.add(re);
        re.putIntProp(REGEXP_PROP, regexps.size() - 1);
    }
956972
function(element, className) {
    invariant(
      !/\s/.test(className),
      'CSSCore.removeClass takes only a single class name. "%s" contains ' +
      'multiple classes.', className
    );

    if (className) {
      if (element.classList) {
        element.classList.remove(className);
      } else if (CSSCore.hasClass(element, className)) {
        element.className = element.className
          .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1')
          .replace(/\s+/g, ' ') // multiple spaces to one
          .replace(/^\s*|\s*$/g, ''); // trim the ends
      }
    }
    return element;
  }
829805
public static Filter replaceInBuffer(final String regexp, final String replacement) {
        return replaceInBuffer(Pattern.compile(regexp), replacement);
    }
1131779
function filterStyleTag(html, config) {
    var result;

    if (config.removeMatchedTag) {
        result = html.replace(REGEXP_TAG_STYLE, '');
    } else {
        result = html.replace(REGEXP_TAG_STYLE, function(body) {
            return escapeTags(body);
        });
    }

    return result;
}
237183
public static void removeAll(Document document) {
        List<String> elementsId = null;

        elementsId = getElementsId(document);

        removeAll(elementsId);
    }
177053
public function cleanStyles($e)
    {
        if (!\is_object($e)) {
            return;
        }

        $elems = $e->getElementsByTagName('*');

        foreach ($elems as $elem) {
            $elem->removeAttribute('style');
        }
    }
181557
function isRegExp(value) {
      var type = typeof value;
      return value && (type == 'function' || type == 'object') &&
        toString.call(value) == regexpClass || false;
    }
1372927
public static void removeChildrenFrom(final Element element) {
        if (element != null) {
            while (element.getFirstChild() != null) {
                element.removeChild(element.getFirstChild());
            }
        }
    }
1369756
public void removeDatum (Object element)
    {
        int dex = _data.indexOf(element);
        if (dex != -1) {
            removeDatum(dex);
        }
    }
1192272
public function replaceTokens($regexp, $fn)
	{
		$this->inspector    = null;
		$this->template     = TemplateModifier::replaceTokens($this->template, $regexp, $fn);
		$this->isNormalized = false;
	}
978140
private static void deleteElem(Scriptable target, long index) {
        int i = (int)index;
        if (i == index) { target.delete(i); }
        else { target.delete(Long.toString(index)); }
    }
676803
public function setRegexp($regexp)
    {
        if (is_string($regexp)) {
            $this->regexp = $regexp;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($regexp) . "' for argument 'regexp' given. String expected."
            );
        }
    }
316179
function removeClass(element, value) {
        var class2remove = value || "",
            cur = element.nodeType === 1 && (element.className ? (" " + element.className + " ").replace(rclass, " ") : "");
        if (cur) {
            while (cur.indexOf(" " + class2remove + " ") >= 0) {
                cur = cur.replace(" " + class2remove + " ", " ");
            }
            element.className = value ? trim(cur) : "";
        }
    }
1290406
public static void remove(Element elem, boolean recurse) {
		elem.removeAttributeNS(URI, SRC_ATTR);
		elem.removeAttributeNS(URI, LINE_ATTR);
		elem.removeAttributeNS(URI, COL_ATTR);
		if (recurse) {
			NodeList children = elem.getChildNodes();
			for (int i = 0; i < children.getLength(); i++) {
				Node child = children.item(i);
				if (child.getNodeType() == Node.ELEMENT_NODE) {
					remove((Element) child, recurse);
				}
			}
		}
	}
1173173
function removeComplete(regex, lines, start) {
  var matches = lines[start].match(regex);
  var i = 0;
  var s = lines[start];
  matches = s.match(regex);

  while (!matches) {
    i++;
    if ((start + i) > lines.length) return;
    s += lines[start + i];
    matches = s.match(regex);
  }
  lines.splice(start, i + 1);
}
592732
public function scan($regexp)
    {
        if (preg_match($regexp.'A', $this->source, $match, null, $this->pos)) {
            $this->match = $match[0];
            $this->pos += strlen($this->match);

            return true;
        }

        return false;
    }