繁体   English   中英

无与伦比(正则表达式;标记为< - HERE in m /(< - HERE error perl

[英]Unmatched ( in regex; marked by <— HERE in m/( <— HERE error perl

我无法解决这个错误......

@temp=split(/(/)/,$headerLine);

出现此错误

Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE

采用

@temp=split(/(\/)/,$headerLine);

要么

@temp=split(m&(/)&,$headerLine);

括号中的斜线过早地终止了正则表达式。

你的第二个/字符正在终止正则表达式,因此Perl将你的代码解释为:

@temp=split /(/

其次是垃圾。

简单地逃避文字/

@temp=split(/(\/)/, $headerLine)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM