Can anyone assist me in utilizing regex to identify any incomplete items that start with {{
.
I have attempted to search for instances in the string that begin with {{
and are followed by letters (a-Z) but do not end with }}
. However, my attempts always result in null.
string = 'Hello {{name}}, you are {{a';
console.log(string.match(/^({{)?[a-z]:[A-Z]$/g));
The desired outcome would be {{a
in this scenario since {{name}}
is complete. Any assistance offered would be highly appreciated.
The only things allowed within it are .
eg: {{name.forename}}
{{name.lastname}}