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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 686 views
  • 1 like
  • 2 in conversation