fixed issue with regex based replacement in urls