improve regexp support