refactor regex based selectors, move regex construction out of them