[
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]
local reproduction
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}/'
#runs successfully
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
> 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
>
> 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]
>
> local reproduction
> 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}/'
> #runs successfully
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)