String: Lorem ipsum {{dolor}} sit {{amet}}, consectetur adipisicing {{elit}},
I want to extract a list of all tags which are wrapped in {{ }} from above mentioned string and work on them i.e check db if they exist or not and than replace them as markdown link as follows.
[substring](/tag/:substring_id)
i can replace them with
String.replace(string, ~r/\{\{.+?\}\}/, "new substring")
but this doesn't help me because i can't work on substrings i.e check the db.
i didn't find any String.scan or String.find type of functions which returns substrings as a list. if you know how to do it than please let me know.
Thanks in advance for your effort and time :)