Please add a comment saying e.g.

// See if the last wildcard had an extension