in reply to Re^2: Only sometimes deprecated? "Unescaped left brace in regex is deprecated"
in thread Only sometimes deprecated? "Unescaped left brace in regex is deprecated"
Because (? is invalid syntax on its own, in any (?X pattern the X is unambiguously special or incorrect, but never litteral. perlre however does talk about extending the quantifier syntax.
like making the lower bound of a quantifier optionalAnd any new syntax that's not a modifier can be added with a (?X pattern. That's why I concluded that disallowing unescaped litteral { was probably an opening toward new quantifier syntax (because { only introduces quantifiers). I thought of something like /.{{!($_ % 3)}}/ instead of /(?:.{3})*/ (it's harder to read though ...), or even "3ABCD" =~ /(\d)(.{{$1}})(.*)/; #(3,"ABC", "D"). But that's wild guesswork
PS: How do you like all those unbalanced left tokens? ^^"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Only sometimes deprecated? "Unescaped left brace in regex is deprecated"
by LanX (Saint) on Jun 02, 2017 at 18:59 UTC |