using regex to patch web addresses