How would you parse the ['i386', 'x86_64']
out of a string like '-foo 23 -bar -arch ppc -arch i386 -isysroot / -fno-strict-aliasing -fPIC'
?
>>> my_arch_parse_function('-foo 23 -bar -arch i386 -arch x86_64 -isysroot / -fno-strict-aliasing -fPIC')
>>> ['i386', 'x86_64']
Can this be done using regex, or only using modules like PyParsing, or manually splitting and iterating over the splits?
Assumption: -arch VAL
are grouped together.