06-13-2017 06:50 PM
I want to take a column withe expresions like:
and creat a new colmun that will give me only the expression startin with "A" and the number after it"
I tried to us a formula substr starting with "A":
Substr(:colmun1, A, 5)
Any help will be appreciated.
06-13-2017 07:19 PM - edited 06-14-2017 12:18 AM
06-14-2017 11:50 PM
replace var with any variable name.
indexc function looks for a character (or characters) while index function looks for a string.
in this case as the list is made of one character, you can use each of the functions.
06-14-2017 12:55 AM
Keep everything starting at uppercase A:
data WANT; STR='+$A1234'; STR1=prxchange('s/.*(A.*)/$1/',1,STR); putlog STR1=; run;