Parsing dates from string - regex
问题 I'm terible with regex and I can't seem to wrap my head around this simple task. I need to parse out the two dates in a string which always has one of two formats: "Inquiry at your property for December 29, 2013 - January 03, 2014" OR "Inquiry at your property for 29 December , 2013 - 03 January, 2014" the 2 different date formats are throwing me off. Any insights would be appreciated! 回答1: /(\d+ \w+, \d+|\w+ \d+, \d+)/ for example. Try it out on Rubular. For sure, it would pickup more stuff,