BookmarkSubscribeRSS Feed
deleted_user
Not applicable
When using the compress function with the P modifier, which removes all punctuation from a string, what is the definition of punctuation?
2 REPLIES 2
polingjw
Quartz | Level 8
If you look at the documentation on the ANYPUCT function, the following characters are considered punctuation in the ASCII character set:

! “ # $ % & ‘ ( ) * + , - . / : ; = ? @ [ \ ] ^ _ ` { | } ~

In addition, the less than and greater than symbols are also considered punctuation. (I can’t remember how to properly post these characters in this forum.) I would imagine that the same character set would be considered punctuation when using the compress function with the P modifier.
deleted_user
Not applicable
Thank you.

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2246 views
  • 1 like
  • 2 in conversation