FirstRegexMatch
4 min
returns the substring of text that is the first match of /regex/ 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 lastword modifier as used in syntax firstregexmatch(text, exp) 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 look for the regular expression exp the regular expression to look for in the text return value returns a subset of text that is the first match of the regular expression returns null if there is no match example firstregexmatch("hello there! this is a test, isn't it?", /there test/i) the example above returns "there! this is a test"
