$re = '/^(\s*(?:Su|M|Tu|W|Th|F|S|R))((?:Su|M|Tu|W|Th|F|S|R){1,2})(.*)/m';
$str = 'WRF 9a-5p
WR 9-10:15a
WR 7:15-8:45p
WF 9a-12:10p
WF 9:30-11:30a
WF 8-10:45a
WF 12-2:45p
Su 9a-6p
WF 10-11:50a
W 9a-12p
W 9a-12p
W 9a-12:20p
W 9a-12:20p
W 9a-12:20p
W 9:30a-4:45p';
$subst = "$1$3\n$2$3";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php