我正在处理一个 *.po 文件,我正在尝试捕获 and 之间的所有文本msgid ""
,msgstr ""
并不是很幸运,永远不会超过一行:
msgid ""
"%s asdfgh asdsfgf asdfg %s even if you "
"asdfgdh sentences with no sense. We are not asking translate "
"Shakespeare's %s Hamlet %s !. %s testing regex %s "
"don't require specific industry knowledge. enjoying "
msgstr ""
我试过的:
var myArray = fileContent.match(/msgid ([""'])(?:(?=(\\?))\2.)*?\1/g);
感谢您的帮助,我不太擅长正则表达式 :(