I would need to extract the first three consonants for each element of a list. Can someone help me?
thank you very much
LIST TO BE
PAROLA PRL
LIBRO LBR
NEWSPAPER NWS
Use compress-function to remove vowels, then substr to get the first three chars.
consonants = substr(compress(word, 'aeiou', 'i'), 1, 3);
if you are 100% sure that you have only upcase letters in your list, than use
consonants = substr(compress(word, 'AEIOU'), 1, 3);
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.