Module: ScraperLeague::RegularExpressions
- Defined in:
- lib/vegas_insider_scraper/scraper_league.rb
Overview
Regular Expressions Module
Constant Summary collapse
- RECORD_REGEX =
/(?<wins>\d+)-(?<losses>\d+)/- NFL_RECORD_REGEX =
/(?<wins>\d+)-(?<losses>\d+)-(?<ties>\d+)/- NHL_RECORD_REGEX =
/(?<wins>\d+)-(?<losses>\d+)-(?<ot_losses>\d+)-(?<shootout_losses>\d+)/- TIME_REGEX =
/(?<mo>\d{2})\/(?<d>\d{2}) (?<h>\d+):(?<mi>\d{2}) (?<mer>\w{2})/- MONEYLINE_OVER_UNDER =
/(?<ou>\d+(\.5)?)[ou]/x
- ODDS =
/(<br><br>(?<home_line>-\d+(\.5)?))|(<br>(?<away_line>-\d+(\.5)?)[+-]\d\d<br>)| ((?<over_under>\d+(\.5)?)[ou]((-\d{2})|EV)(?<home_line>-\d+(.5)?)-\d\d\z)| ((?<away_line>-\d+(.5)?)-\d\d(?<over_under>\d+(\.5)?)[ou]((-\d{2})|EV)\z)/x
- SOCCER_ODDS =
/(?<away_line>(-|\+)?((-0)|(\d|\.)+))(((\+|-)\d\d)|(EV))(?<home_line>(-|\+)?((-0)|(\d|\.)+))(((\+|-)\d\d)|(EV))/- SOCCER_MONEYLINE_ODDS =
/(?<away_moneyline>(-|\+)\d+)(?<home_moneyline>(-|\+)\d+)(?<draw>(-|\+)\d+)(?<over_under>\d((\.5)|(\.25)|(\.75))?)(o|u).\d\d/- RUNLINE_ODDS =
/(?<away_line>(\+|-)\d+(\.5)?)\/(\+|-)\d{3}(?<home_line>(\+|-)\d+(\.5)?)\/(\+|-)\d{3}/- MONEYLINE_ODDS =
/((?<over_under>\d+(\.5)?)[ou]-\d{2})?(?<away_moneyline>(\+|-)\d{3}\d*)(?<home_moneyline>(\+|-)\d{3}\d*)/- DOUBLEHEADER =
/DH Gm (?<id>\d)/- RESULTS_DOUBLEHEADER =
/\(DH (?<doubleheader>\d)\)/- GAME_RESULTS =
/(?<result>\D+)(?<team_score>\d+)-(?<oppo_score>\d+)|(Postponed)|(Cancelled)/- SPREAD_RESULTS =
/((?<ats_result>\w+)\/)?(?<ou_result>\w+)/