I'm looking to match mentions of foo in a username. I need to be able to match text strings that start with '@' and contain the word 'foo' at any location within that username, ending by either a space or grammar.
I neeed to be able to match:
example1: @anycharacterhere_foo, anything else here
example2: @foo_anymorecharacters here
I'm looking to use the stringr library like so:
str_extract_all(x, perl("?<=@"))
What I don't understand is the match all
function