Equinox Online Help - Language Reference - A to Z

Home

Remove

Applies to
SyntaxRemove StringItem, SearchExpression [, FormatExpression]
Action[Statement] Removes specified characters from within a string.
ScopeUsable anywhere.
Notes

SearchExpression is a string containing the characters you want to remove from StringItem. A search is performed in StringItem for each of the characters in SearchExpression. If found, the characters are removed.

The optional argument, FormatExpression, allows you to more accurately specify which characters are removed from StringItem. FormatExpression can take the following values:

  • 1 Remove all trailing characters from StringItem.
  • 2 Remove all leading characters from StringItem.
  • 3 Remove all leading and trailing characters from StringItem.
  • 4 Remove all the characters that are in SearchExpression from StringItem. This is the default.
  • 9 Remove all trailing characters from StringItem, except those that are in SearchExpression
  • 10 Remove all leading characters from StringItem except those that are in SearchExpression
  • 11 Remove all leading and trailing characters from StringItem, except those that are in SearchExpression
  • 12 Remove all characters from StringItem, except those that are in SearchExpression

Note that if you want to remove a particular sequence of characters from StringItem, you should use the Replace function and substitute a null string.

CategoryString handling
See Also ChrList, Chrs, Compare, Fill, IsNumber, Left_Function, Len, Match, Maxlen, Mid_Function, Remove, Replace, Right_Function], Search_SearchNext, SetLen, SetMaxLen, SortOrder, SubstituteData
Example

This example removes everything except digits from a phone number.

Remove PhoneNum, "0123456789", 12

The next example removes all spaces from a registration number.

Remove CarRegn, " "