This vignette compiles a variety of examples, most taken straight from Stack Overflow. When possible, I will link the source of the example. To run any of the examples (i.e. copy/paste), just run the following:

library(RVerbalExpressions)

Extract all words after a specific tag

In this example, we want to extract every word that comes after a @, including the @. To do this, we will:

  1. First, find the @ tag
  2. Second, match a range of characters, a through z and 0 through 9
  3. Third, match one_or_more characters in the range
  4. Fourth, match with_any_case thereby enabling case insensitive matching

Source: https://stackoverflow.com/questions/31105862