regex chech url +common method of adding