<?php $expression = "end"; preg_match('~^(?:(?P<offset>[0-9]+)(?:st|nd|rd|th)* from )*(?P<position>start|beginning|last|end)+$~i', $expression, $matches); var_dump($matches);
You have javascript disabled. You will not be able to edit any code.