Dear all,
I sometimes use an 'if' statement to extract the variables I need, like
tarlist=[k for k in spssaux.GetVariableNamesList() if 'v42' in k.lower()]
Is it right that I can only specify a single, simple character string behind 'if'? Or, put differently, if I have variables [v42 av42 bV42 V42_blah v420] and I'd like to extract the v42 variables (v42 and V42_blah) from them, am I going to need a RE statement ('starts with (case insensitve) V42 and then no more digits (to exclude v420)')?
TIA,
Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com