首页 » 技术分享 » Unescaped left brace in regex is illegal here in regex; marked by HERE in

Unescaped left brace in regex is illegal here in regex; marked by HERE in

 

Unescaped left brace in regex is illegal here in regex; marked by <– HERE in m/${ <– HERE ([^ \t=:+{}]+)}/ at xxx line xxx

转载自https://www.cnblogs.com/zengjfgit/p/9178523.html

原因

原因是Perl不支持以前的写法。

解决方法

编辑提示的文件
xxx的行号
xxx

例如
/usr/bin/automake
3930

将 -
$text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

修改为 -
$text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
-   $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+   $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

转载自原文链接, 如需删除请联系管理员。

原文链接:Unescaped left brace in regex is illegal here in regex; marked by HERE in,转载请注明来源!

0