Hi i am having some observations i want all the 3character and 2numeric continuos obs
Name
My id no is ERT33
no policy
ERJ45 my poicy runs\
Existing id POU89 | LOP90
good number LUI90 and ENU90
the no is UI789
the no is PKA67
In this i wnat the names that start with three character and two numerics moved to out variable
Name | out
My id no is ERT33| ERT33
no policy|
ERJ45 my poicy runs|
Existing id POU89 | LOP90| POU89 | LOP90
good number LUI90 and ENU90| LUI90 and ENU90
the no is UI789|
the no is PKA67| PKA67
Using a DATA step, you can parse each input record and use the ANYDIGIT and ANYALPHA functions along with SUBSTR. Also, the LENGTH function can be used to get the actual length of the input buffer (SAS special variable _INFILE_) for a DO/END loop for parsing the input.