Fix regex to match urls with trailing slashes