(PE-5860) Modify regex matching

Modify regex matching so that only part of the uri of the
request need match the regex, and so that the part that matches
is the beginning of the request uri.