Owning Class: string
Requires: MathScript RT Module
a = regex_convert(option, format)
Legacy Name: regexptranslate
Converts a string to a regular expression to use with the regex function, the regex_i function, or the regex_replace function.
| Name | Description | ||||
|---|---|---|---|---|---|
| option | Specifies how to convert the string to a regular expression. option is a string that accepts the following values.
|
||||
| format | Specifies the pattern to convert to a regular expression. |
| Name | Description |
|---|---|
| a | Returns the regular expression. |
a1 = regex_convert('wildcard', '*')
a2 = regex_convert('escape', '\n')
a3 = regex('a.txt, b.doc, cd.xls, 223.vi, 89.txt', regex_convert('wildcard', '*.txt'))
a4 = regex_convert('wildcard', '*.txt')