我正在尝试使用 rubular 构建一个正则表达式来匹配:
On Feb 23, 2011, at 10:22 , James Bond wrote:
或者
On Feb 23, 2011, at 10:22 AM , James Bond wrote:
这是我到目前为止所拥有的,但由于某种原因它不匹配?想法?
(On.* (?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{1,2}, [12]\d{3}.* at \d{1,2}:\d{1,2} (?:AM|PM),.*wrote:)
如何使 AM/PM 文本可选?要么匹配 AM/PM,要么都不匹配?