regex checking for url ending working