`pathname[pathname.length - 1]` is a single letter, why the `search` rather than a `match`?