BookmarkSubscribeRSS Feed
NKormanik
Barite | Level 11

I just finished doing some slicing-and-dicing of a character field, using SAS built-in functions.  Involved many steps and seemed a lot more complicated than I would have guessed.

 

Just curious, do most advanced users here graduate to another approach to character field manipulation?

 

I see that SAS also allows using RegEx.  Would RegEx be a better approach to many character field manipulations?

 

Here is an example of one manipulation I was attempting:

 

Have:

rg1_23456a_7

 

Want:

34a

Thanks much.

 

Nicholas Kormanik

 

 

1 REPLY 1
Reeza
Super User

You need to show a rule and/or pattern. You can't extrapolate from a single data point. 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 570 views
  • 0 likes
  • 2 in conversation