I have a vector
c("SRSF1_IP_tmt_kit_2hours_04_4ul.raw", "SRSF1_IP_tmt_kit_2hours_01_4ul.raw",
"SRSF1_IP_tmt_kit_2hours_01_1ul.raw", "SRSF1_IP_tmt_kit_2hours_04_1ul.raw",
"SRSF1_IP_tmt_beads_2hours_01_4ul.raw", "SRSF1_IP_tmt_beads_2hours_01_1ul.raw",
"SRSF1_IP_tmt_beads_2hours_02_1ul.raw", "SRSF1_IP_tmt_beads_2hours_02_4ul.raw",
"SRSF1_IP_tmt_beads_2hours_03_4ul.raw","SRSF1_IP_tmt_beads_2hours_03_1ul.raw",
"SRSF1_IP_tmt_beads_2hours_04_1ul.raw","SRSF1_IP_tmt_beads_2hours_04_4ul.raw",
"SRSF1_IP_tmt_kit_2hours_02_1ul.raw", "SRSF1_IP_tmt_kit_2hours_02_4ul.raw",
"SRSF1_IP_tmt_kit_2hours_03_4ul.raw", "SRSF1_IP_tmt_kit_2hours_03_1ul.raw"
)
I would like to get the indices of elements that have BOTH "4ul" AND "kit" word. I have looked at many tutorials on regular expressions (e.g. https://www.rstudio.com/wp-content/uploads/2016/09/RegExCheatsheet.pdf) and they only show how to match either of the two (using "|") , but not both.