# let's create a simple interpolation
x = c("Ken", "Barbie")
sma_expr = "{' loves 'c ? x}. But does {' love 'c ? rev(x)}?"
string_magic(sma_expr)
# We recover the two expressions
(char = get_interpolated_expr(sma_expr))
# same with parsing
(expr = get_interpolated_expr(sma_expr, parse = TRUE))
# see the difference
eval(char[[1]])
eval(expr[[1]])
# and only the variables:
get_interpolated_vars(sma_expr)
Run the code above in your browser using DataLab