Permalink
Browse files

supporting both em and strong for both pitcher and hitter stats. shou…

…ld be working now.
  • Loading branch information...
1 parent 012189c commit 00d907757db24613618a89a9b1b7e69ecca56074 Sean Schulte committed Apr 17, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 BaseballReferenceStatParser.php
@@ -262,7 +262,7 @@ function getStats() {
$hitterStats = $this->parseHitterStats($stats);
return $hitterStats;
} else {
- $res = preg_match("/<td [^\>]*\>([\.\d]+)\<\/td\>/", $line, $matches);
+ $res = preg_match("/<td [^\>]*\><?s?t?r?o?n?g?>?<?e?m?>?([\.\d]+)<?\/?e?m?>?<?\/?s?t?r?o?n?g?>?\<\/td\>/", $line, $matches);
if ($res) {
array_push($stats, $matches[1]);
}
@@ -274,7 +274,7 @@ function getStats() {
$pitcherStats = $this->parsePitcherStats($stats);
return $pitcherStats;
} else {
- $res = preg_match("/<td [^>]*><?e?m?>?([\.\d]+)<?\/?e?m?>?<\/td>/", $line, $matches);
+ $res = preg_match("/<td [^>]*><?s?t?r?o?n?g?>?<?e?m?>?([\.\d]+)<?\/?e?m?>?<?\/?s?t?r?o?n?g?>?<\/td>/", $line, $matches);
if ($res) {
array_push($stats, $matches[1]);
}

0 comments on commit 00d9077

Please sign in to comment.