The stripchar( function extracts characters you don’t want from a text item.


This function has two parameters:

text – is the item of text from which you want to extract characters.

range – specifies what kinds of characters you want to keep and (implicitly) what kinds of characters you want to strip away. The range consists of one or more pairs of characters. Each pair specifies a set of characters you want to keep. For example, the pair AZ means that you want to keep the characters from A to Z. For alphanumeric characters the set is pretty obvious. For other types of characters you should check a Unicode character chart. For example the pair #& specifies a set of four characters: #, $, % and &.

If a pair consists of the same character repeated twice in a row, the set is just that single character. For instance the pair ## means you want to keep one character: #.

The range may consist of several pairs put together. For example the range AZaz09.. consists of four pairs, and specifies that all letters, numbers, and periods will be kept, with all other characters stripped away.


The stripchar( function removes characters you don’t want from a text item. You specify exactly what kinds of characters you want and don’t want included in the final output.

stripchar("abcdefghijklmnopqrstuvwxyz","af") ☞ abcdef
stripchar("abcdefghijklmnopqrstuvwxyz","mq") ☞ mnopq
stripchar("abcdefghijklmnopqrstuvwxyz","afxz") ☞ abcdefxyz
stripchar("abcdefghijklmnopqrstuvwxyz","aaeeiioouu") ☞ aeiou
stripchar("Now is the time","aaeeiioouu") ☞ oieie
stripchar("Your Mileaage May Vary","AZ") ☞ YMMV

See Also


10.0UpdatedCarried over from Panorama 6.0, but now handles Unicode character ranges instead of ASCII.