Hi, I'm looking to extract multiple words from a longer string for the purposes of text mining. At the moment, all I can think of would be to concatenate the output from two SCAN functions, but I was wondering if there was a simpler way?
Current method in PROC SQL is:
CAT(SCAN(string, 1),' ',SCAN(string, 2))
There might be some things you can do, but we don't have a lot to work with.
You have some code that smashes the first word of a string together with the second word of a string.
Maybe if you supplied some dummy sample data and a little bit more about the output you want to generate, we could provide some better guidance.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Submit your idea!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for:
View all other training opportunities.