The regexliteral( function adds  characters to text as necessary so that it can be used as a literal in a regular expression.


This function has one parameter:

text – The text to be used as a regular expression literal.


Use this function if you need to use the text in a Panorama field or variable as literal text within a regular expression. The function adds backslash (\) characters in front of any characters that normally would have special meaning within the regular expression (*, |, $, *, ., +, etc.)

regexliteral(".") ☞ \.
regexliteral("William H. Smith Jr., D.D.S.") ☞ William H\. Smith Jr\., D\.D\.S\.

This function is normally used in conjunction with the regular expression operators and functions like regexmatch, regexarray( and regexreplace(. For example, suppose you want to find all occurrences of someone’s name in parentheses. The formula below will do the trick even if the name contains periods or other characters with special meaning in regular expressions.


See Also


10.0NewRegular expression support is new in this version