I'm working on a web app where users can create text templates. For example when the user is creating a new template they would write any variable text like so [[variable]]
.
Example:
Hi [[recipient]],
Here are your login credentials:
Username: [[username]]
Password: [[password]]
When the user submits the template form I need to search through the content string and get all the variables that they created and put them in an array. So for this example I'm trying to get an array that looks like this:
[recipient,username,password]