Desktop productivity for business analysts and programmers

finding numeric values in a character string

Reply
N/A
Posts: 0

finding numeric values in a character string

Hi,

A='A1B2N3M4L5';

THE OUTPUT SHOULD BE =12345


I have variable A which contains a string. how can i get numeric values from that string.?
SAS Employee
Posts: 159

Re: finding numeric values in a character string

b=compress(x,'0123456789','k');
or
b=compress(x,'dk');
Ask a Question
Discussion stats
  • 1 reply
  • 82 views
  • 0 likes
  • 2 in conversation