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), load the following package:

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, construct the verbal expression with rx
  2. Then, rx_find the @ tag
  3. Then, match all alphanumeric characters
  4. Then, match one_or_more characters in the range

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