Hi Patrick,
i managed to use your prxchange and prxparse within my proc sql query and it works like a dream. Just wanted to say thank you for this.
Would you mind explaining the arguments for prxparse('s/(.)\1+/$1/io')?
DISCLOSURE: I realize that this is not a timely reply, but since this post comes up in Google searches for "remove duplicate characters in a SAS string", I have decided to inform readers who stumble upon this post through their search about the following new development:
I recently published a blog post Removing repeated characters in SAS strings in which I create a new user-defined function UNDUPC that removes duplicate characters from SAS strings effectively expanding functionality of the COMPBL function to all other characters.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.