ReplaceRegex
4 min
replaces all matches of a regular expression in the specified text with a specified pattern see https //developer mozilla org/en us/docs/web/javascript/guide/regular expressions https //developer mozilla org/en us/docs/web/javascript/guide/regular expressions for information about regular expressions this function can be used to replace the removecarriagereturns, removelinebreaks, trim, trimend, and trimstart modifiers as used in syntax replaceregex(text, exp, pattern) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes business rules calculation rules (after save, with or without also recalculate on load) yes business rules calculation rules (before save or always, without also recalculate on load) yes business rules calculation rules (before save or always, with recalculate on load) yes business rules editing rules yes business rules initialization rules yes business rules read only rules yes business rules required rules yes business rules validation rules yes client expressions yes object permissions no services yes ldap yes mobile yes quick actions (except ui quick actions) yes ui quick actions yes reports yes search/dashboard without field references yes search/dashboard with field references no parameters parameter description text the text in which to match exp the regular expression to look for in the text pattern the pattern with which to replace the regular expression can have references to capture groups return value text value example $(replaceregex("the large dog ran after the small cat ", /(the) (\[a z ] ) (dog ) (\[a z]+) (cat)/,"$1 $4 $3 $2 $5")) this example returns "the small dog ran after the large cat "
