BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shalmali
Calcite | Level 5

Thanks a lot Arthur for the code. Also I appreciate for explaining the code.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

hey Arthur,

can you please explain this:

x=find(biography,'.',-1*(length(strip(biography))-2));

Thanks

art297
Opal | Level 21

: It is setting the value x to equal the position (from left to right) where a period exists, starting from a position 2 less than the end of the string being held in the variable biography, less any spaces that may exist in that field.

I.e., it didn't want to find the period at the end of the string but, rather, the period at the end of the preceding string.  That way, the variable last could be created that would contain everything from the period at the end of the 2nd to last string, up to the end of the string that was captured in the biography variable.  In short, the last sentence (the one containing the degree information).

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

thanks

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 18 replies
  • 3350 views
  • 9 likes
  • 4 in conversation