refactor regex location