5. The medium of claim 2 , wherein constructing the backref-NFA comprises: for each sub-backref-regex embedded in a pair of matching brackets, constructing a corresponding sub-backref-NFA, and additional edges on both sides of the sub-backref-NFA, the additional edges respectively labeled to identify an opening bracket and a closing bracket of the each pair of matching brackets; and for each back-reference, constructing an additional edge labeled to indicate the back-reference.
2. The medium of claim 1 , wherein the method further comprises: determining a value of the worst-case time complexity of the backref-regex based on the determined maximum number; and providing the determined worst-case time complexity value.