[
https://issues.apache.org/jira/browse/PIG-5368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Laszlo Bodor updated PIG-5368:
------------------------------
Description:
|In perl v5.22, using a literal { in a regular expression was deprecated, and
will emit a warning if it isn't escaped: \{. In v5.26, this won't just warn,
it'll cause a syntax error.|
Example:
[https://github.com/apache/pig/blob/e766b6bf29e610b6312f8447fc008bed6beb4090/test/e2e/pig/tests/cmdline.conf#L47]
{code}
$ perl -e 'print "It matches\n" if "Hello World" =~ /World{abc}/'
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in
m/World\{ <-- HERE abc}/ at -e line 1.
$ perl -e 'print "It matches\n" if "Hello World" =~ /World\{abc}/'
{code}
was:
|In perl v5.22, using a literal { in a regular expression was deprecated, and
will emit a warning if it isn't escaped: \{. In v5.26, this won't just warn,
it'll cause a syntax error.|
Example:
[https://github.com/apache/pig/blob/e766b6bf29e610b6312f8447fc008bed6beb4090/test/e2e/pig/tests/cmdline.conf#L47]
{code}
$ perl -e 'print "It matches\n" if "Hello World" =~ /World\{abc}/'
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in
m/World\{ <-- HERE abc}/ at -e line 1.
$ perl -e 'print "It matches\n" if "Hello World" =~ /World\\{abc}/'
{code}
> Braces without escaping in regexes throws error in recent perl versions
> -----------------------------------------------------------------------
>
> Key: PIG-5368
> URL: https://issues.apache.org/jira/browse/PIG-5368
> Project: Pig
> Issue Type: Bug
> Reporter: Laszlo Bodor
> Assignee: Laszlo Bodor
> Priority: Major
> Fix For: 0.18.0
>
> Attachments: PIG-5368-1.patch
>
>
>
> |In perl v5.22, using a literal { in a regular expression was deprecated, and
> will emit a warning if it isn't escaped: \{. In v5.26, this won't just warn,
> it'll cause a syntax error.|
> Example:
> [https://github.com/apache/pig/blob/e766b6bf29e610b6312f8447fc008bed6beb4090/test/e2e/pig/tests/cmdline.conf#L47]
>
> {code}
> $ perl -e 'print "It matches\n" if "Hello World" =~ /World{abc}/'
> Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in
> m/World\{ <-- HERE abc}/ at -e line 1.
> $ perl -e 'print "It matches\n" if "Hello World" =~ /World\{abc}/'
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)