public function modifiers(string $modifiers): self
    {
        if ('' === $modifiers) {
            return $this;
        }

        $copy = clone $this;
        $copy->modifiers .= $modifiers;
        return $copy;
    }
public function modifiers(string $modifiers): self
    {
        if ('' === $modifiers) {
            return $this;
        }

        $copy = clone $this;
        $copy->modifiers .= $modifiers;
        return $copy;
    }
public function modifiers ( string $ modifiers ) : self { if ( '' === $ modifiers ) { return $ this ; } $ copy = clone $ this ; $ copy -> modifiers .= $ modifiers ; return $ copy ; }
Create new Lexer extending this one with RegExp modifiers

Same modifiers will be applied both to tokens and whitespaces regexps.

Here only "global" modifiers like `u`, `x`, `D`, etc. should be used.
Other modifiers like `i` should (but not required) be used locally
in specific parts like `(?i)[a-z]` or `(?i:[a-z])`.

> Note: Returned object can be the same one in case of empty additions.
@param string $modifiers Additional modifiers to whole regexps.
@return static
@since 1.4.0
Create new Lexer extending this one with RegExp modifiers