escape regex in resource_location test