I have the following regex to match the last pair of braces in a string,
.+(?={)(.+)(?=})
The example string is,
abc{abc=bcd}{g
Anyway, regcomp uses POSIX BRE or ERE, which doesn't support look-ahead or look-behind.
regcomp
.+{(.+)}
Grab the string you want from group index 1.
DEMO
Uses an anchor to specify the pattern should match when at the end of a line.
(?<=[{]).*(?=[}]$)