improved grep, moved regex to util