more regex improvements