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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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