cleanup, prepare for REGEXP search