Hi Everyone, I would like to extract a list of codes from a particular dataset. I tried to use regular expressions but unfortunatly didnt manage to exract the whole list of codes but only first occurence of the pattern. The codes are quoted, consist from 3 to 5 digits, start with V or E or numbers {0-9} and continue with numbers. What I have: data test; length codelist $120; input codelist $; datalines; DX(i)('410','412')CC_GRP_1 DX(i)('39891','40201','40211','40291','40401','40403','40411','40413','40491','40493', '4254','4255','4257','4258','4259','428')CC_GRP_2 DX(i)('0930','4373','440','441','4431','4432','4438','4439','4471','5571','5579','V434') DX(i)('36234','430','431','432','433','434','435','436','437','438')CC_GRP_4 ; run; data test2; set test; retain pattern_num ; if _n_ = 1 then pattern_num = prxparse("/('E|V|\d\d*')/"); call prxsubstr(pattern_num,strip(codelist),start, lenght); run; Desired output: '410','412' '39891','40201','40211','40291','40401','40403','40411','40413','40491','40493' '4254','4255','4257','4258','4259','428' '0930','4373','440','441','4431','4432','4438','4439','4471','5571','5579','V434' '36234','430','431','432','433','434','435','436','437','438' Thanks in advance
... View more