BookmarkSubscribeRSS Feed
user112a2
Obsidian | Level 7

I am looking through someone's code. What does this piece of code do? I am getting better at PRXCHANGES and regex's. I am not a pro yet but still learning. It looks to me like it is replacing something like P.O. BOX with PO BOX. Does \s? mean optional spaces? and 0? mean 0 is optional? Also :? means : is optional? Looks like I may be understanding some of it. Thanks

 

Removed

 

1 REPLY 1
PGStats
Opal | Level 21

The question mark stands for zero or one occurrence. So you could use the folowing to look at all the replacements

 

X='ABC0 P.O. BOX: 123';

 

 

PG

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 698 views
  • 1 like
  • 2 in conversation