I was discovering CategoricalArrays when I realize I couldn't filter this vector with Regex. I looked to the exported functions and I found the unwrap function and it seemed to work. Why shouldn't this work directly? is there another form to work with?
using CategoricalArray;DataFrame;
df=DataFrame(x=1:6,
fruit=categorical(vcat(repeat(["banana"],3),repeat(["pineapple"],3))));
df[occursin.(r"ple",df.fruit),:] #you'll get an error