1
編譯正則表達式時,我試圖運行一個腳本,定義了一些(複雜)的正則表達式:https://github.com/wo/opp-tools/blob/master/rules/Keywords.pm。每當我包含這個模塊時,Perl都會崩潰,並顯示消息「panic:reg_node溢出嘗試在rules/Keywords.pm第60行發出51」。這是在Ubuntu 12.04上的Perl v5.14.2。任何想法可能是這個原因,將不勝感激。「reg_node超限」在Perl
更新:這是導致問題的代碼片段。
use strict;
use warnings;
use utf8;
my $re_address_word = qr/\b(?:
universit|center|centre|institute?|sciences?|college|research|
avenue|street|philosophy|professor|address|department|
umass
)\b/ix;
our $re_publication_word = qr/\b(?:
forthcoming|editors?|edited|publish\w*|press|volume
to\sappear\sin|draft|editor\w*|reprints?|excerpt|
circulation|cite
)\b/ix;
my $re_notitle = qr/
$re_address_word |
$re_publication_word |
\b(?:thanks?|
@|
[12]\d{3}|
abstract
)/ix;
our $re_title = qr/^
(?!.*$re_notitle?.*)
\p{IsAlpha}
/x;
你能發佈導致問題的正則表達式嗎?以防萬一,github中的行號與您擁有的行號不同。 – Jerry
我將你的模塊包含在一個沒有錯誤的腳本中。您能否與我們分享一些更多信息? – psxls
請包含一個演示問題的小示例腳本。不要鏈接到可能陳舊的外部事物。 :) –