In a very long text, I'd like to search for strings with the following properties:
- Starts with (let's say)
#. - Ends with (let's say)
@. - Does not contain
#or@. - Does not contain the substring (let's say)
blah.
I'm aware that this is a "negative lookahead" problem and that Emacs regexp cannot exclude a whole string like blah. Some answers on Stackexchange (eg this and various answers to this) say that one could use elisp to match and then complement, but they don't say how.
Any ideas on how I could accomplish the regexp search above?