STRIP

Syntax

STRIP(string_expression, "identifier")

Description

Returns only the requested type of characters from a string: alpha, numeric, punctuation, whitespace, other/unknown.

Arguments

string_expression The string to be evaluated.
identifier The type of character to return. Following are the valid values for this argument:

A — Alpha
N — Numeric
P — Punctuation
W — Whitespace
O — Other or unknown

Returns

This function is useful for reformatting data such as phone numbers, zip or postal codes and social security numbers. Use in conjunction with FORMAT.

Remarks

Use the "O" identifier to remove all characters except those that have an ASCII value of less than Hex 20 (decimal 32) or greater than Hex 7F (decimal 127). The characters between decimal 32 and decimal 127, which are not stripped out by the "O" identifier, include all of the characters found on a standard QWERTY keyboard.

Whitespace refers to space, tabs, or certain Unicode characters identified as blanks..

Examples

STRIP("(603) 555-1234","N")

Returns: "6035551234"

STRIP("abc123.456def", "AP")

Returns: "abc.def"

Related Topics

Text Functions