I'm trying to use the gdb_types script to register a new type, let's say 'foo'
However, I do not want that to match when foo is used within a template type, such as tuple<foo, int, int>
I'm not particularly adept with RegExps, but the scripts that come with C::B would suggest using
[^[:alnum:]_]*foo[^[:alnum:]_]*")However, that also matches the tuple example above
I essentially don't want to have a < before or a comma after 'foo', which leads me to try
(?<![a-zA-Z0-9<])foo(?![a-zA-Z0-9,])That doesn't work when I try to use that in the script, but it does work as I expect when I run it through an online
RegExp checker.
(i.e. 'foo' should pass, '<foo' shouldn't, nor should 'foo,')
Other option would be
[^a-zA-Z0-9<]+CEID[^a-zA-Z0-9,]+but that won't match 'foo' by itself.
thoughts & help?