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. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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