matching strings
Posted: Wed Feb 16, 2011 10:30 am
Hey Guys, how are you?
I have this string with non-unique elements in it, and I need to find out the positions of a particular element:
e.g.,
Let's say I want to find out the positions of all the "John" in this string. I know with @wfind you can find out the position of the first one (in this case, 1), but is there an easy way where Eviews can tell me the answer "1 4 5" in one shot? I have thought about putting %names into a svec but then I feel that it's a bit cumbersome. If I do @instr(%name, "John"), it only gives me the position of where the first "John" starts. Would you please let me know your thoughts on this? Thanks.
Tchaithonov
I have this string with non-unique elements in it, and I need to find out the positions of a particular element:
e.g.,
Code: Select all
%names = "John Paul Andrew John John Tom"Tchaithonov