[ticket/13073] Add path regex to get_preg_expression() and add unit tests

We're now calling get_preg_expression() instead of hardcoding the regex into
the helper route method.

PHPBB3-13073