I'm trying to match lines that do not begin with "CD" or any 2-digit number. I've tried:
As others have said, you need
(?: ... ) is a non-capturing group
Or if you must avoid parentheses of any sort then use
To comply with your new spec "I'm actually trying to match lines not beginning with CD or 2 digit numbers"
You need to get over your problem with the parentheses. A negative look-ahead is fine in PCRE and does not capture