BookmarkSubscribeRSS Feed
ICL1986
Fluorite | Level 6

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))

1 REPLY 1
HB
Barite | Level 11 HB
Barite | Level 11

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. 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1906 views
  • 0 likes
  • 2 in conversation