accept function to regexp option