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 2025: Call for Content

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!

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