grep using a character vector with multiple patterns
In addition to @Marek’s comment about not including fixed==TRUE, you also need to not have the spaces in your regular expression. It should be “A1|A9|A6”. You also mention that there are lots of patterns. Assuming that they are in a vector Then you can create your regular expression directly using paste and collapse = “|”.