我有两个字符串看起来像这样的正则表达式匹配特定字符串的字符>
X-Antivirus-Mail-From: [email protected] via mail From: "Test UserAccount" <[email protected]> there is more information past this
X-Antivirus-Mail-From: [email protected] via mail From: <[email protected]> there is more information past this
我想创建一个正则表达式,将返回本作的第一个字符串
From: "Test UserAccount" <[email protected]>
这第二串
From: <[email protected]>
到目前为止,我的正则表达式图案看起来像这样
From: ["<].*
但我希望它总是在字符>上结束。
任何帮助?谢谢!
我怎样才能把这个java吗? “性格给我的问题,如果我\”他们这样做鼻涕工作。 – medium
Java倾向于自动添加锚点,因此您需要迎合这一点。 – npinti