STRIP( TEXT, TEXT, TRUE_FALSE, TRUE_FALSE )

Placeholder Tooltip Replace With
TEXT t: Text The name of a Text variable, or the string of characters you need to search
TEXT characters: Text The character or string of characters for which you want to search. You can strip any alphanumeric characters from a text string, including the following special characters: (Make sure you include the backslash.)

\\ -- backslash character

\h -- non-breaking hyphen

\l -- line break

\p -- paragraph mark

\s -- non-breaking space

\t -- tab

TRUE_FALSE

(optional)

[at beginning: True/False] The value of TRUE if characters should be stripped from the beginning of the text. Optional. Default is TRUE.
TRUE_FALSE

(optional)

[at end: True/False] The value of TRUE if characters should be stripped from the end of the text. Optional. Default is TRUE.

Returns a Text value

This expression removes a specified character or characters from the beginning or end of a text answer. By default, HotDocs removes the characters from both the beginning and the end of the text. If you want to specify just one or the other, you must use the TRUE_FALSE parameters.

For example, perhaps you want to remove punctuation or space characters from the end of an answer (because the punctuation is already included in the document text). The following script will help you accomplish this:

SET Product Description TO STRIP(Product Description, " !.,?", FALSE, TRUE)

Because the FALSE and TRUE parameters are used, HotDocs strips the characters from the end of the answer (TRUE) and not the beginning (FALSE).

 

TRIM( TEXT ) is equivalent to STRIP( TEXT, "\t\", TRUE, TRUE ). See TRIM( TEXT ) for more information.