Text Functions
Formula Pro custom text functions including regex support and string checks.
CONTAINS
Checks whether a string contains another string. Case-sensitive by default.
Syntax: CONTAINS(target, searchString, [caseSensitive])
target
The string to search in
searchString
The substring to find
caseSensitive
Optional. true (default) or false
Example:
CONTAINS("Formula Pro", "Pro")Result: true
Example:
CONTAINS("Formula Pro", "pro", false)Result: true (case-insensitive)
Example:
CONTAINS("Formula Pro", "Excel")Result: false
TEXT
Formats a number as text using Excel-style format codes. Wraps Formula.js TEXT.
Syntax: TEXT(value, format_text)
Example:
Result: "1234.56"
Example:
Result: "2025-03-09"
Example (date column / mirror lookup value):
When the lookup resolves to a calendar date string (e.g. 2026-05-23), Formula Pro coerces it automatically — you do not need to wrap with DATEVALUE.
REGEXREPLACE
Replaces text matching a regex pattern. Supports replacement of all matches or a specific occurrence.
Syntax: REGEXREPLACE(text, pattern, replacement, [occurrence], [case_sensitivity])
text
Input text
pattern
Regex pattern (as string)
replacement
Replacement string (supports $1, $2 for capture groups)
occurrence
Optional. 0 = replace all (default); 1, 2, ... = replace Nth match only
case_sensitivity
Optional. 0 = case sensitive (default); 1 = case insensitive
Example: Replace all occurrences
Result: "bubble"
Example: Replace specific occurrence
Result: "tubtle" (only second "t" replaced)
Example: Capture groups
Result: "03/13/2026"
Example: Case-insensitive
Result: "Product plan"
REGEXTEST
Tests whether text matches a regex pattern. Returns true or false.
Syntax: REGEXTEST(text, pattern, [case_sensitivity])
text
Text to test
pattern
Regex pattern
case_sensitivity
Optional. 0 = case sensitive; 1 = case insensitive
Example:
Result: true
Example:
Result: false (string is not all digits)
Last updated