Subtract other regular expression from this one.
Subtract other regular expression from this one. The resulting expression will match the strings that are matched this expression and are not matched by the other, and only those. Differences take O(n⋅m) time, where n and m are the number of states of the DFA of the operands.
Return whether this expression matches at least one string in common with another.
Return whether this expression matches at least one string in common with another. Intersections take O(n⋅m) time, where n and m are the number of states of the DFA of the operands.
Return whether this regular expression is equivalent to other.
Return whether this regular expression is equivalent to other. Two regular expressions are equivalent if they match exactly the same set of strings. This operation takes O(n⋅m) time, where n and m are the number of states of the DFA of the operands.
Intersect this regular expression with another.
Intersect this regular expression with another. The resulting expression will match the strings that are matched by the operands, and only those. Intersections take O(n⋅m) time, where n and m are the number of states of the DFA of the operands.
Return whether this expressions matches every expression that is matched by another, but the expressions are not equal.
Return whether this expressions matches every expression that is matched by another, but the expressions are not equal. Two diff between the two operands are done internally.
Return whether this expressions matches every expression that is matched by another.
Return whether this expressions matches every expression that is matched by another. An diff between the two operands is done internally.
Similar to method matches, except that also return how many characters were successfully matched in case of failure.
Return whether a string is matched by the regular expression (i.e.
Return whether a string is matched by the regular expression (i.e. whether the string is included in the language generated by the expression). As the match is done using a DFA, its complexity is O(n), where n is the length of the string. It is constant with respect to the length of the expression.
Return whether this regular expression matches anything.
Return whether this regular expression matches anything. Note that the empty string is a valid match.
Unite this regular expression with another.
Unite this regular expression with another. The resulting expression will match the strings that are matched by either of the operands, and only those. Unions take O(n⋅m) time, where n and m are the number of states of the DFA of the operands.
A regular expression, ready to be tested against strings, or to take part in an operation against another. Internally, instances of this type have a DFA (Deterministic Finite Automaton).