Prev: how can you get counts using first .and last. in datastep
Next: How to use macro variable in libname statatement.
From: =?ISO-8859-1?Q?Daniel_Fern=E1ndez?= on 7 Jan 2010 07:48 hi all, I am trying to count words from a string (if they match with any value of my TWO lists of identifiers). data have; input idnum topologia $40.; cards; 1 A90/A80/B40/F30 2 B40/F30/A89 3 A90/A87/A80/F30/K10 ; run; If the values (all uppercase) for each of my two lists are: POSITIVE in (A90,A80,F12) NEGATIVE in (B40,A89,W45,K10) ... I would like the output looks like: idnum positive negative 1 2 1 2 0 2 3 2 1 I know it is perfect opportunity to use perl regular expressions but my knowledge about them resumes only to matching and parsing. Thanks in advance! Daniel Fernandez Barcelona |