Can you recommend Regex to find superscripting in data?
For example, I need to find occurrences of ordinals using the superscripted st, nd, rd, th.
What are you looking for ? What does your data look like .Better make an example to explain your question .
\d+st
\d+nd
\d+rd
\d+th
Xia Keshan
In the example below I list some products with descriptions containing superscripted ordinals. I want to find any product description that has a raised st, nd, rd or th. I do not need to find products that don't have the raised lettering, such as in the examples 1st, 2nd, 3rd or 4th.
I don't think so. I believe that the superscripted letters are just regular letters with a different font, and I can't see anything in REGEX documentation that deals with fonts.
I'll be interested to see if a REGEX expert can provide better insight.
Tom
Please provide some actual sample data as close to your real data as possible (eg. as an attachment) and not only a screen shot. If these are actual superscripts then I would expect that this information must be stored somewhere in the string (so when looking at the actual hex values used) - and if this is the case then we can look for such hex values to identify your superscript stuff. But in order to figure this out we need actual data from you.
Looking at your screenshot: Would it also be possible to simply search for "1st", "2nd", "3rd", "<any other single digit or more than one digit>th"?
I agree with you Patrick. If its an RTF destination then the actual RTF code should be present. However PDF for instance may be more difficult.
SAS knows of no superscription in it's data, character variables are just strings of bytes.
Any superscription that you see comes from output formatting, not from the data.
Can you show the SAS code that produced this:
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.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.