【发布时间】:2019-01-21 16:19:11
【问题描述】:
我想创建一个正则表达式来匹配一个与Localize(" 共享的字符串,并且应该在" 弹出时结束,而不是在" 被转义时结束(前面是\)。
我当前的正则表达式没有考虑“除非前面”看起来像:
\bLocalize\(\"(.+?)(?=\")
有什么想法吗?
编辑
使用以下字符串:
Localize("/Windows/Actions/DeleteActionWarning=The action you are trying to \"delete\" is referenced in this document.") + " Want to Proceed ?";
我希望它在 document. 出现后停止,因为它是第一个出现而没有尾随 \ 的 "(出现在 delete 周围)
【问题讨论】:
标签: python regex lookahead lookbehind