BookmarkSubscribeRSS Feed
MarkWik
Quartz | Level 8

I would like to learn PRX group of functions thoroughly and am in need of pointers to certain documentation with examples that starts and explains from the very basic to advanced regular expressions in sas. I have read the SAS documentation however I am unable to comprehend the concept to my satisfaction. Can somebody share plz?

 

Thanks so much in advance,

Mark

3 REPLIES 3
Reeza
Super User

Regular expressions are not a SAS concept, it originates with Perl and can be used in a ton of places, I think there’s even Excel adding or default options that use it now. 

 

The cheat sheet is a good day to day reference

https://support.sas.com/rnd/base/datastep/perl_regexp/regexp-tip-sheet.pdf

 

Maybe this site will help

https://regexr.com

ChrisHemedinger
Community Manager

And for SAS specifics, check out this paper by David Cassell: The Basics of the PRX functions.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
FreelanceReinh
Jade | Level 19

Hi @MarkWik,

 

In 2015 I was in a very similar situation. Eventually, I bought the e-book version of "Introduction to Regular Expressions in SAS®" by Matthew Windham and read the first three of its four chapters. I was a bit surprised that it doesn't cover all available metacharacters. Still, this book helped me familiarize myself with the more common ones as well as with the PRX functions and CALL routines.

 

However, I use regular expressions so rarely in my programs (more often in the Replace dialog box of the Enhanced Editor) that I usually need to look up the precise syntax again.

sas-innovate-2024.png

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.

 

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
  • 3 replies
  • 477 views
  • 1 like
  • 4 in conversation