I have a string like this:
This is very sad, and this is [very sad] and [test;very sad]
What I need, is a regexp that will capture ‘very sad’ only if it is not inside brackets. I tried something like this:
[^\[](very sad)[^\]]
But it doesn’t seem to work if ‘very sad’ is at the beginning of the string, and when it does – it captures some extra spaces around the string, as can be seen here: