Class LookBehindAssertion

All Implemented Interfaces:
AbstractState<Term,ASTTransition>, RegexASTVisitorIterable, JsonConvertible

public class LookBehindAssertion extends LookAroundAssertion
An assertion that succeeds depending on whether or not text preceding the current position matches a given regular expression.

Corresponds to the ( ? <= Disjunction ) and ( ? <! Disjunction ) right-hand sides of the Assertion goal symbol in the ECMAScript RegExp syntax.

Currently, the fragment of regular expressions that TRegex supports in lookbehind assertions is limited to so-called "literal" regular expressions, consisting only of concatenations and character classes (which generalize literal characters). The method LookAroundAssertion.isLiteral() verifies whether the body of the assertion (RegexASTSubtreeRootNode.getGroup()) is of this form.