Skip to content

scape left brace in regex.#16

Open
sebastic wants to merge 1 commit intoflackem:nextfrom
sebastic:unescaped-left-brace-in-regex
Open

scape left brace in regex.#16
sebastic wants to merge 1 commit intoflackem:nextfrom
sebastic:unescaped-left-brace-in-regex

Conversation

@sebastic
Copy link

Quoting perldelta:

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.

http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern

Fixes #12

Quoting perldelta:

> 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.

http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern

Fixes flackem#12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant