Not all perl regular expressions are supported by PRX functions.
However, it does support two useful modifers: "i" and "?"
case-insensitive modifer "i":
'/substring/i'
parens non-capturing modifer "?":
'/(?:substring1)/'
And they can be used together:
'/(?i:substring)/'
'/(?-i:substring)/'
'/(?-i:substring1)substring2/i'
Showing posts with label modifier. Show all posts
Showing posts with label modifier. Show all posts
Monday, February 9, 2009
Tuesday, December 2, 2008
Useful informat modifiers
The world is not perfect. Likewise, raw data is not always clean.
With SAS powerful input facility, we can handle different format data.
There are four input styles: column, list, formatted and named.
In my opinion, the most powerful and interesting style is formatted.
Here are 4 useful modifiers, which can be used in formatted input.
#1: colon format modifier (:)
character data that contains more than eight characters
numeric data that contains special characters.
#2: ampersand format modifier (&)
character data that contains single embedded blanks.
Note: The only restriction is that at least two blanks must divide each value from the next data value in the record.
#3: double question mark modifier (??)
Suppress the error messages resulting from invalid data/argument. This can be used in INPUT function and INPUT statement. The modifier also resets the automatic variable _ERROR_ to 0.
#4: single question mark modifier (?)
Suppress the error messages resulting from invalid data/argument. This can be used in INPUT function and INPUT statement.
Compared with informat modifier, there are format modifier for PUT function at below.
-L left aligns the value.
-C centers the value.
-R right aligns the value.
Obviously, format modifier is not much useful.
With SAS powerful input facility, we can handle different format data.
There are four input styles: column, list, formatted and named.
In my opinion, the most powerful and interesting style is formatted.
Here are 4 useful modifiers, which can be used in formatted input.
#1: colon format modifier (:)
character data that contains more than eight characters
numeric data that contains special characters.
#2: ampersand format modifier (&)
character data that contains single embedded blanks.
Note: The only restriction is that at least two blanks must divide each value from the next data value in the record.
#3: double question mark modifier (??)
Suppress the error messages resulting from invalid data/argument. This can be used in INPUT function and INPUT statement. The modifier also resets the automatic variable _ERROR_ to 0.
#4: single question mark modifier (?)
Suppress the error messages resulting from invalid data/argument. This can be used in INPUT function and INPUT statement.
Compared with informat modifier, there are format modifier for PUT function at below.
-L left aligns the value.
-C centers the value.
-R right aligns the value.
Obviously, format modifier is not much useful.
Subscribe to:
Posts (Atom)