Hi,
I have one requirement where I have to identify a pattern in column and trim the column accordingly and it should be dynamic in nature.
So the ask here is to remove all the characters, numbers and underscore from the last of the string till the eight digit numbers are removed. The length of string may vary but pattern remains same.So it will be something like this as below :-
QH1234AGA3BARIALBA12345678M_A => QH1234AGA3BARIALBA
QL4321AGARIC_ANNBC87654321M_A = > QL4321AGARIC_ANNBC
QL0000LAGRICCQQ_BC99998888ABC_A => QL0000LAGRICCQQ_BC
So the highligted part will always have 8 digit number followed by characters which can be of any length than followed by _ (Underscore) and than character which can be of any length.
So there is a pattern in string which I am able to achieve this through a sas perl function (prxchange('s/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*[A-Z]*_*[A-Z]//', -1, Col1)) but don't know how to achieve it in SAS VA.
Thanks,
Anurag
... View more