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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 2307 views
  • 9 likes
  • 4 in conversation