Hi everyone,
I have survey data files coming in, that hold very long variable labels. A variable label could look something like this:
"[This is a question that has been asked?] and a whole lot of stuff trailing the question, none of which i need".
What I'd like to do, is retain the question (which is always between square brackets), and drop the rest. I've been able to do this in a text editor (BBEdit), using Regular Expressions... but I'd like to script it, macro it, python it.. within SPSS. So I can include it in a workflow.
Anyone ever managed to do something like this?
Thanks in advance!
Ernst Jan Hölscher
------------------------------
Ernst Jan Hölscher /
ernstjan@me.com / Research in Psychology
------------------------------
#SPSSStatistics