in reply to No need to escape right brace in regex
I don’t know why, but this behaviour is apparently by design:
A literal "{" should now be escaped in a pattern
If you want a literal left curly bracket (also called a left brace) in a regular expression pattern, you should now escape it by either preceding it with a backslash ("\{") or enclosing it within square brackets "[{]", or by using \Q; otherwise a deprecation warning will be raised. This was first announced as forthcoming in the v5.16 release; it will allow future extensions to the language to happen.
— perl5211delta#Deprecations
Presumably the planned “future extensions to the language” (whatever they are) won’t be affected by unescaped right braces.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: No need to escape right brace in regex
by no_slogan (Deacon) on Oct 21, 2014 at 06:57 UTC | |
by syphilis (Archbishop) on Oct 21, 2014 at 08:14 UTC | |
by LanX (Saint) on Oct 21, 2014 at 09:28 UTC | |
by LanX (Saint) on Oct 21, 2014 at 10:18 UTC | |
by syphilis (Archbishop) on Oct 21, 2014 at 10:34 UTC | |
by LanX (Saint) on Oct 21, 2014 at 10:58 UTC |