HotDocs Models: strip( text, text, true_false, true_false)

Placeholder Replace With
text The name of a Text variable, or the string of characters you need to search
text (optional) 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) The value of true if characters should be stripped from just the beginning of the text
true_false (optional) The value of true if characters should be stripped from just the end of the text

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 ItemDescription to strip(ItemDescription, " !.,?", 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).