The goog.dom.pattern.Text Class

goog.dom.pattern.Text
> goog.dom.pattern.AbstractPattern

goog.dom.pattern.Text(match)

Pattern object that matches text by exact matching or regular expressions.

match {string|RegExp}
String or regular expression to match against.

.matchToken(token, type)

Test whether the given token is a text token which matches the string or regular expression provided in the constructor.

token {Node}
Token to match against.
type {goog.dom.TagWalkType}
The type of token.
returns {goog.dom.pattern.MatchType}
MATCH if the pattern matches, NO_MATCH otherwise.

.matchedNode {Node}

Inherited from goog.dom.pattern.AbstractPattern .

The first node matched by this pattern.

.reset()

Inherited from goog.dom.pattern.AbstractPattern .

Reset any internal state this pattern keeps.