regex improvements