Basically I am having the following vector of strings.
first sp.z.o.o.
second s.a #should be removed
third sp z o o
fourth PP #should be removed
fifth sp z o.o.
sixth #should be removed
seventh sp z oo
eighth LTD. #should be removed
nineth sp-z-o-o
tenth spzoo
eleventh sp.zo.o
And from that I want to perform sub-setting only on those which contain all possible combination of sp z o.o. with and without spaces/double spaces, dots, comas and other symbols (such as * | - etc.). And for that I tried to use the following code, but it seems that it doesn't work.
sample <- df[grepl("(sp\\.z\\.o\\.o\\.)", df$col_1), ]
and also
sample <- df[grepl("(sp\\.*z\\.*o\\.*o\\.*)", df$col_1), ]