pass flags to regexp