为什么preg_match_all()返回空的matches数组


Why is preg_match_all() returning empty matches array?

Regex模式:/{if's+(isRegion|isCountry)([a-z]+?)}/i

预期匹配项:

{if isRegionAsia}
{if isRegionEurope}
{if isCountryChina}

此处的工作示例:http://regex101.com/r/gL4qN9/2

那么,为什么在PHP中,preg_match_all()会返回一个包含3个空结果而不是匹配结果的数组呢?我在这里错过了什么?提前感谢您的帮助!

'/{if's+(isRegion|isCountry)([a-z]+?)}/i'对我来说很好。请在此处查看它的实际操作。

事实证明它一直在工作。

::slowly backs away::