I'm using this regex:
\([^)]+\d{4}\)
to match scientific citations (they are between parentheses and end with a year):
Text text text (Hung et al., 2020; Sung et al., 2021) text text
Now I want to match everything that is not a scientific citation (in this case, Text text text
and text text
). I tried using a negative lookahead:
(?!\([^)]+\d{4}\))
But when I tried to replace the matches with nothing, nothing was replaced.
What could be the problem and how to fix it?