我目前正在使用:
preg_match("/(.*)On\s+(Sun|Sat|Fri|Thu|Wed|Tue|Mon),\s+(January|February|March|April|May|June|July|August|September|October|November|December)\s+\d?\d,\s+\d{4}\s+at\s+\d?\d:\d\d\s+[AP]M,/i", $to, $end);
它适用于:
$string = "I need to match this. On Sun, May 27, 2012 at 9:23 AM, Prov";
但不适用于:
$string = "I need to match this.
On Sun, May 27, 2012 at 9:23 AM, Prov";
$string2 中的返回不允许匹配。我可以更改我的 preg_match 中的某些内容,以便返回不会破坏我的结果吗?