Regular expression fix to find base url