I'm struggling to create a regex pattern to split strings correctly.
Opening line:
{{ text1 }} 123 {{text1}}{{text1}} {{ text1}}134
Variable text content:
const a = text1;
Splitting outcome:
["{{text1}}"," 123 ","{{text1}}","{{text1}}"," ","{{text1}}","134"]
Remember, the term text1 may vary as it represents a changeable variable value.
I attempted using a new Regexp to accommodate the variable value, but still encountered issues with splitting properly.