I've the pleasure to find all strings in our projects which are not angularjs expressions because we're going multi language (so every string which is not fully between curly braces).
What I wanna do is build a regex which matches all strings, which have no angular expressions (or part of the string is no angular expression).
The var names describe which should match (yes) and which shouldn't (nope).
var yes = "test";
var nope = "{{xyz}}";
var yes = "test {{xyz}}";
var nope = "{{::xyz}}";
var nope = "{{xyz}} {{abc}}"; //as whitespace is okay
Tried a lot of different stuff using negative lookaheads etc. but ended up with a not even close working regex.
"([^}}])+{{|"$
Maybe somebody can help me, as my head is like to explode...
Regex101: https://regex101.com/r/VePtVp/1
^[a-z]+(?: +\{\{[^}]+\}\})?$here.