Improved expand_url regex