I am trying to fix a very old script, which is trying to find a string FILE_DESC_LIMIT
in a text file and change it to something else.
For this my current s
See Regular Expressions in Perl 5.14 Delta: the (?^
now signifies default modifiers. It's just a matter of how the compiled regular expressions are serialized, the more important is the difference between \b
and ^
in your regular expressions.
The documentation on Extended Patterns in perlre has this
Starting in Perl 5.14, a
"^"
(caret or circumflex accent) immediately after the"?"
is a shorthand equivalent tod-imnsx
. Flags (except"d"
) may follow the caret to override it. But a minus sign is not legal with it.
Of those modifiers, -imsx
matches what you saw in v5.10, while -n
enables the capturing behaviour of parentheses and d
enables "default" character set behaviour. These last two are new modifiers
None of those are any different from the values you show in v5.10, so you will have to show your data and exactly what you wrote to get a change in behaviour