I'm trying to match strings of any size NOT surrounded with { and } as in foo{bar} the regex should match foo but not {bar}.
The regexes I originally came up with were ^([^${].*[}$])
and ^(?=[{]).+(?<=[}])
but they don't seem to do what I expected them to do.
If you want to fetch all the characters that is not within {} then you can attempt an split operation using regex.
Split the string by this regex by using your preferred language:
{.*?}
The returned array should consist the segments that was found outside each {}
The following java example returns an array (arr):
which contains: