I am searching a large number of text log files that contain various negative error codes, mostly 4-digits preceded with a minus sign, eg -3304, -3315, etc. I would like to exclude a small set of these error codes while allowing all others to match.
I have tried to use an adaptation from this answer:
"^/(?!-3301|-3304|-3306|-3308|-3309)(-[0-9]{4})"
To exclude -3301, -3304, -3306, -3308, -3309 but match all other 4-digit negative strings.
I know there are matches, such as -3220 in the set of files, but they are not matching.
What have I missed in this attempt at a negative look ahead?