in reply to Regex: Embedded pattern-match modifiers: Empty (?) modifier
Hello AnomalousMonk,
The output can’t be exactly the same across versions 5.8 to 5.14, because in 5.14.0 the (?^...) construct was added to signify default modifiers (see perl5140delta#Regular-Expressions). So, from 5.14 on, the output is:
14:13 >perl 1868_SoPW.pl (?^:(?).*u\/ba$) A: match (?^msx: \A foo (?^:(?).*u\/ba$) ) B: match 14:13 >
But with that caveat, the behaviour is identical across my Strawberry Perl versions 5.12.3, 5.14.4, 5.18.2, 5.20.2, 5.22.0, 5.24.1, and 5.26.0.
My guess — and it’s no more than a guess — is that the documentation is wrong, and should read: Zero or more embedded pattern-match modifiers ...
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex: Embedded pattern-match modifiers: Empty (?) modifier
by shmem (Chancellor) on Feb 10, 2018 at 14:21 UTC | |
by choroba (Cardinal) on Feb 12, 2018 at 14:09 UTC | |
by khw (Acolyte) on Mar 23, 2019 at 18:37 UTC |