```
f2py_flags_re = re.compile(r'[-][-]((no[-]|)(wrap[-]functions|lower)|debug[-]capi|quiet)|[-]include')
f2py_flags = [_m for _m in sys.argv[1:] if f2py_flags_re.match(_m)]
```

(Also someone should inform the author that `-` is not actually a metacharacter and all those `[]`s are pointless, but I'm sure now is not the time to be rewriting f2py...)