Hello, I am hoping to split up these string vars and generate binary new vars based on whether they included the A/B/C/D in the response (so something like q1_a, q1_b, q2_a, and so on, all as 1/0).

The issue I'm running into is that, because this was a total free response formatted question, I can't parse them only on commas, which would just be
Code:
split q1, parse(",")
or only on spaces
Code:
split q1, parse(" ")
... is there a way to parse on different delimiters in one go?


Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input str8 q1 str10 q2
"A B "     "a, c , D"  
"A C "     "b, d "    
"a,c "     "b "        
"d, b"     "a"        
"d, B"     "d, c "    
"b d"      "d, b"      
"A, C, D"  "a b c "    
"B D"      "C, D"      
"b, D"     "A, B, C, D"
"a, c , D" "b"        
"b,  c"    "d, b"      
"A B "     "d, B"      
"A, d"     "b d"      
"c d b"    "A, C"      
"d, b"     "B"        
"d, B"     "b"        
"a "       "a, b, c"  
"A, C, D"  "b  d "    
"b"        "A, B"      
"b, D"     "c "        
"a, c , D" "c d"      
"b,  c"    "A "        
end