User Tools

Site Tools


Match(value, text_list, delimiter)

Category: Special function


This function returns the position index of value in a list of values (text_list), separated by delimiter.

Use cases

This function makes it possible to define EasyMorph expressions externally using parameters.


valueAnyThe value to search for within text_list. This argument is implicitly converted to text.
text_listTextA text-based delimited list of values to search for value.
delimiterTextThe character(s) used to separate the individual values in text_list. This can be more than one character.

Return value type: Number


This function returns 0 if value is not found within text_list.

The values in the delimited string (text_list) are always considered text, even if they look like a number. The first argument (value) is implicitly converted to text.

Delimiter may contain more than one character.


match(5, '5;55;555', ';')  //Returns 1
match('55', '555;55;5', ';')  //Returns 2
match('11', '4;8;12;16;20', ";")  //Returns 0  ('11' is not present in the list.)

See also

syntax/functions/match.txt · Last modified: 2021/09/13 22:46 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki