String manipulation

REGEXV1 – Search and replace string using regular expression

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

Overview

This Custom Field searches for and replaces a given string using a regular expression. It uses an older regular expression parser than REGEX.

Syntax

REGEXV1(SearchString,RegularExpression,ReplaceString)

REGEXV1(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

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

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

See also

REGEX

Was this helpful?