String manipulation

REGEX – Search and replace string using regular expression

88 views June 1, 2018 July 26, 2018 admin 0

Overview

This Custom Field searches for and replaces a given string using a regular expression.

Syntax

REGEX(SearchString,RegularExpression,ReplaceString)

REGEX(FIELDSTR(Stock Code), ‘^(….)(…)(..)’,‘ABC’)

Element Description
SearchString String to search.
RegularExpression The regular expression statement to search for.
ReplaceString The string to replace when a match is found.

 

Example

REGEX(FIELDSTR(Stock Code), ‘^(….)(…)(..)’,‘\1.\2.\3’)

Stock Code REGEX(FIELDSTR(Stock Code), ‘^(….)(…)(..)’,‘\1.\2.\3’)
AAAA12345 AAAA.123.45
BBBB67890 BBBB.678.90
CCCC12345 CCCC.123.45
DDDD67890 DDDD.678.90

See also

REGEXV1

Was this helpful?