I want to identify those observations of the string variable (x), which contain pair of characters "abs" and "def", anywhere in the string.
E.g. I want to identify the observation if x == "he walked to def and abs later" but not if x == "he walked to def and kkk later" (because I want both "abs" and "def" to be there. How can I do this? So far, I have used strpos().
Many thanks,
Mihir
E.g. I want to identify the observation if x == "he walked to def and abs later" but not if x == "he walked to def and kkk later" (because I want both "abs" and "def" to be there. How can I do this? So far, I have used strpos().
Code:
tab y if strpos(lower(y), "abs")
Mihir
Comment