Hi STATALIST,

I have a string variable and detected ga68 out of it by:


Code:
gen ga68 = (strpos(lower(var1), "ga") > 0) & ///
                   (strpos(lower(var1), "68") > 0)

ga68 is 1 if var1 includes ga68 or 68ga.

I need to pick up ga68 only because the order is important. I don't want "ga68" because it could be spaces or non-numeric characters between ga and 68. (e.g. ga 68, ga _ 68, ..)

Could you please let me know your advice?


Regards,