我目前正在使用:
preg_match("/(.*)Ons+(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+ats+d?d:dds+[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中的某些内容,以便返回不会干扰我的结果吗?