For the latest version of JMP Help, visit JMP.com/help.

See Character Functions in the Scripting Guide for details about syntax.
Concatenates character strings to produce a new string with the function’s second character argument appended to the first. For example, "Dr." || " " || name produces a new string consisting of the title Dr. followed by a space and the contents of the name string. (See also Concat Items.)
Returns the numeric position within the first argument of the first instance of the second argument, if it exists. The second argument can contain one ore more characters. If the second argument does not exist, Contains returns a zero. For example, Contains("Veronica Layman", "ay") evaluates as 11. Contains("Lillie Layman", "L") evaluates as 1. The third argument is optional and is a numeric value that specifies the starting position. If offset is negative, Contains searches backward from offset from the end of the string.
Text is a character expression. Munger applies the other three arguments to this string to compute a result.
Offset is a numeric expression indicating the starting position to search in the string. If Offset is greater than the position of the first instance of the find argument, the first instance is disregarded.
Find/Length is a character or numeric expression. Use a character string as search criterion, or use a positive integer to return that number of consecutive characters starting from the Offset position. If you specify a negative integer as the Length value, Munger returns all characters from the Offset through to the end of the string.
Replace (optional argument) can be a string or unspecified. If it is a string and the Find/Offset value is numeric, Munger replaces the search criterion with the Replace string to form the result. If the Find/Offset value is numeric and no string is specified, Munger calculates a substring. If the Find/Length value is a character string, Munger always returns the numeric offset, disregarding the Replace value if it exists. To insert the Replace argument, click any argument in the Munger function and then click the insert button. Use the delete key on your keyboard or the delete button () on the Formula Editor keypad to remove the Replace argument.
The Lowercase function converts any uppercase character found in its argument to the equivalent lowercase character. For example, Lowercase("VERONICA LAYMAN") evaluates as veronica layman. The Uppercase function converts any lowercase character found in its argument to the equivalent uppercase character. For example, Uppercase("Veronica Layman") evaluates as VERONICA LAYMAN.
Calculates the length of its argument. For example, Length("Veronica") evaluates as 8. If the argument is
If start is negative, Substr searches backward from start from the end of the string. If length is negative or absent, Substr returns a string that begins with start and continues to the end of the text string.
Substr can also be used with lists.
Produces a new character string from its argument, removing any leading and trailing whitespace. The second argument determines if whitespace is removed from the left, the right, or both ends of the string. If no second argument is used, whitespace is removed from both ends. For example, Trim("john  ") evaluates as john. Trim("  john  ", both) also evaluates as john.
Extracts the nth word from a character string. One or more spaces define where each word begins and ends unless the optional delimiters argument is specified. For example, Word(2, "Veronica Layman") returns the word Layman.
To insert the delimiters argument, click on any argument in the Word function and then click the insert button on the Formula Editor keypad. Use the delete key on your keyboard or the delete button on the Formula Editor keypad to remove the delimiters argument. If you do not specify a delimiter, space is used as the delimiter. If you define the delimiter as an empty string, each character is treated as a separate word.
Extracts the words from text according to the delimiters listed in the optional second argument. The default delimiter is space. For example, Words("the quick brown fox") returns {"the","quick","brown","fox"}.
To insert the delimiters argument, click on any argument in the Words function and then click the insert button on the Formula Editor keypad. Use the delete key on your keyboard or the delete button on the Formula Editor keypad to remove the delimiters argument. If you do not specify a delimiter, white space is used as the delimiter. If you define the delimiter as an empty string, each character is treated as a separate word.
Returns a substring of the left-most or right-most n characters of the string text, respectively. Both functions also work with lists.
Returns 1 if whole begins or ends with part, respectively. Returns 0 otherwise. Both functions also work with lists.
Is different than the Word function because of the way it treats word delimiters. If a delimiter is found multiple times, or you enter a delimiter with multiple characters, the Word function treats them as a single delimiter. The Item function uses each delimiter to define a new word position. To compare, suppose a name is of the form lastname, firstname. The delimiter is a comma followed by a blank, such as:
The Item function returns a missing value because it treats the comma and blank separately and finds nothing between them. The Word function treats the comma and blank as a single delimiter and finds Veronica as the second word.
Hex returns the hexadecimal representation of its argument. If the argument is character (in quotes), then the result is a character string twice as long containing the hexadecimal codes for the character values. For example, Hex("A") returns the string 41.
Hex to Char converts hexadecimals to characters. The resulting character string might not be valid display characters. All the characters must be in pairs, in the ranges 0-9,A-Z, and a-z. Blanks and commas are allowed and skipped.
Char to Hex converts characters to hexadecimals.
Hex to Number converts hexadecimals to numbers.
A third argument applies when Repeat is used in a JSL script to repeat a matrix. When the first argument is a matrix, the second argument is the rowwise repeat and the third argument is the columnwise repeat.
Insert inserts a new item into the list or expression at the given position. If position is not given, it is inserted at the end.
Insert Into is the same as insert, but it inserts in place.
Remove the character(s) at the indicated position. If n is omitted, the item at position is deleted. If position and n are omitted, the item at the end is removed. There are three possible arguments: the string, followed by the position, followed by the number of characters to be removed.
Remove From returns items removed in place. The function returns the removed item(s), but you do not have to assign them to anything. The first argument is a variable name, followed by the position, followed by the number of characters to be removed.
Shift shifts an item or n items from the front to the back of the list or expression. Shifts items from back to front if n is negative. Shift Into shifts items in place.
Reverse reverses the characters in the string. Reverse Into reverses the characters in place.
Concat Items converts a list of string expressions into one string, with each item separated by a delimiter. The delimiter is a blank, if unspecified.
The first argument is a string, the second is a pattern, and the third is a replacement string. Substitute finds all matches to the pattern in the string, and replaces them with the replacement string. Substitute Into does the same substitution in place.
By default, Regex performs a case-sensitive search and returns the parts of the source string that match the pattern that you specified (or returns MISSING if the match fails). There are two optional arguments that you can add. You can type a third argument—the format—that specifies the string to return. If you choose, you can use regular expressions to specify replacement text in the returned string. If you specify the third argument, you can also specify IGNORECASE so that Regex ignores capitalization when searching the source string for a match.
Table A.1 Regex Examples 
For more information and an example that you can run, select Help > Scripting Index and do a search for Regex.
XPath Query parses a valid XML document for the expression that you specify. For an example, select Help > Scripting Index and search for the function.
Hex to Blob converts the hexadecimal to a blob (Binary Large Object).
Char to Blob converts the string to a blob. You can specify the encoding in an optional second argument. The default encoding for the blob is utf-8. utf-16le, utf-16be, us-ascii, iso-8859-1, shift-jis, euc-jp, and ascii~hex are also supported.
Blob to Char converts the blob to a string. You can specify the encoding in an optional second argument. The default encoding for the character string is utf-8. utf-16le, utf-16be, us-ascii, iso-8859-1, shift-jis, euc-jp, and ascii~hex are also supported.

Help created on 3/19/2020