data frame – Extract data subset by filter

I am a layman in the field and I don't know the technical language used to describe the problem. I hope to do it

I have a data frame (let's call it "table") with 5 variables and more than 20,000 rows. The last variable contains reasonably long text in each string.

I would like to extract a subset of data from the data frame that consists of cases whose last variable (call it "variable5") contains the word "flexible". It may be present in some cases in the middle of the string text.

I thought about using RegEx, but I didn't succeed.

I tried using the following command:

subset <- table (table $ variable5 == ". + flexible. +",)

But I didn't get any results, although there are cases in which the word "flexible" appears.

Could someone point me to where the error is?