in reply to Purpose of the "caret" character in "qr" regex output
$ man perlre Starting in Perl 5.14, a "^" (caret or circumflex accent) immediately after the "?" is a shorthand equivalent to "d-imnsx". Any positive flags (except "d") may follow the caret, so (?^x:foo) is equivalent to (?x-imns:foo) The caret tells Perl that this cluster doesn't inherit the flags of any surrounding pattern, but uses the system defaults ("d-imnsx"), modified by any flags specified.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Purpose of the "caret" character in "qr" regex output
by roho (Bishop) on Jul 31, 2025 at 04:33 UTC |