RegExp在JavaScript中执行时冻结

时间:2018-03-01 07:26:56

标签: javascript node.js regex

我遇到一个非常奇怪的问题,即RegExp在执行(或测试)特定字符串时会冻结。这是我的RegExp:

/when( .+)* enters the battlefield/gim

这是导致冻结的特定文本

"Lifelink\nWhen Queen's Agent enters the battlefield, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.)",

它冻结了Chrome和Nodejs(v9.6.1)。任何帮助将不胜感激!

0 个答案:

没有答案