Include and exclude filter type codes simultaneously

I want to filter for C-17s while excluding Cessna C172s

Doesn’t appear to be possible, these type code filters don’t work:

^(?!C172)|C17
C17|^(?!C172)

Is there anyway to filter by type code that includes and excludes something?

^C17$, where ^ and $ represent the start and end of the string

Thanks, that works! I’ll remember to use $ in the future if I find any type codes that overlap.

Found another one! This one is more difficult:

I want to include all Airbus A330 type codes:
A33.

But I want to exclude Schleicher AS 33 glider type code:
A33P

Is there any way to exclude the Glider code while including all A330s? Or would be easier just to specify all A330 type codes? Example: A332, A333, etc.

Some possibilities…

^A33[0-9]$ match any digit as the fourth/last character
^A33[23789]$ only the digits actually (currently) used by ICAO
^A33[^P]$ anything except the letter P - but this would still match A33E
^A33[^PE]$ anything except the letters P or E
^A33[^A-Z]$ anything that’s not a letter

Thanks, I will go with ^A33[^A-Z]$ as it seems to work perfectly for my use case.

1 Like