<?php $str = 'December 2012 Name: Jack Brown'; $ptr = "/^(?P<month>:Jan(?:uary)?|Feb(?:ruary)?|Dec(?:ember)?) (?P<year>:19[7-9]\d|2\d{3})/"; preg_match($ptr, $str, $data); echo $data['month'].' '.$data['year'];
You have javascript disabled. You will not be able to edit any code.