Can’t speak for best practices, but here’s a quick and dirty regex:
iex(1)> string = "This is a string with {{token0}} and {{token1}} embedded"
"This is a string with {{token0}} and {{token1}} embedded"
iex(2)> Regex.scan(~r/{{(.*)}}/U, string, capture: :all_but_first)
[["token0"], ["token1"]]


















