Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex Perl分割正则表达式非贪婪拟合&燃气轮机&引用;作为分隔物_Regex_Perl_Split_Non Greedy - Fatal编程技术网

Regex Perl分割正则表达式非贪婪拟合&燃气轮机&引用;作为分隔物

Regex Perl分割正则表达式非贪婪拟合&燃气轮机&引用;作为分隔物,regex,perl,split,non-greedy,Regex,Perl,Split,Non Greedy,我想用两个或更多的“>”来拆分字符串,拆分函数应该在第一个“>”中停止字符串,在列表中其他的放在第二位 我试着 但拆分仍然会在每个“>”中中断这不是{1}的工作方式(事实上,{1}根本不做任何事情)。根据split有第三个limit参数。尝试: split(/>/, $text, 2) 最多返回2个子字符串 split(/>/, $text, 2)

我想用两个或更多的“>”来拆分字符串,拆分函数应该在第一个“>”中停止字符串,在列表中其他的放在第二位

我试着


但拆分仍然会在每个“>”

中中断这不是
{1}
的工作方式(事实上,
{1}
根本不做任何事情)。根据
split
有第三个
limit
参数。尝试:

split(/>/, $text, 2)
最多返回2个子字符串

split(/>/, $text, 2)