Hi,
Hope someone can help. I am trying to flag values that contain one of a number of key words I have in a list. I could ordinarily use something like this:
however, my list of keywords is over 150 and so this doesn't seem the most efficient way of doing this - also not sure if regexm will support that many different values.
What I would like to do is generate a lookup file with my key words in it and then merge this with my base data in order to generate a flag using something like
but am guessing this isn't feasible. Any suggestions appreciated.
Thanks
Tim
Hope someone can help. I am trying to flag values that contain one of a number of key words I have in a list. I could ordinarily use something like this:
Code:
clear input str10 corp "INC " "INC. " "INCOME " " INC " " INC. " "ZINC " " INCOME " " INC" " INC." " ZINC" end generate m = regexm(corp,"^INC[. ]| INC[. ]| INC[.]?$") list, clean
What I would like to do is generate a lookup file with my key words in it and then merge this with my base data in order to generate a flag using something like
Code:
merge m:m regexm(lookupname) using lookupfile tab _m
Thanks
Tim
Comment