refactor regex route to regex builder