I am trying to come up with a PHP regex that matches any strings except strings which have two open curly braces at the start as well as two closed curly braces at the end.
So anything other than specifically:
{{someString}}
The string can have no braces, as long as it's not 2 open and 2 closed at the start and end of the string.
So far my best attempt has been
^(?!{{).+(?!}})$
But I later realized that this doesn't match a string like {{x
(because it starts with {{
); I do want that string to match, just not something like {{x}}
.
How can I fix this?