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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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