wwUtils::ReplaceTextAndDelimiters

This function is a combination of STREXTRACT() and STRTRAN() that allows you to search for a string between a pair of delimiters and then replace that string with another value. Replaces the full matched text including the delimiters.

ReplaceTextAndDelimiters(lcSource,lcStart,lcEnd,lcReplace,llAll)

Return Value

modified string on success, original string if no matches were found.

Parameters

lcSource
The source string to search

lcStart
The start delimiter to find.

lcEnd
The end delimiter to find.

lcReplace
The string to replace the content between the start and end delimiters, including the delimiters

llAll
Replace all instances of this match. By default only the first instance is replaced.

Remarks

When using with llAll set there's an assumption that the leading delimiter changes in the lcReplace expression/value. Otherwise this function will cause a recursive stack pop.

This is a global function in wwUtils not a method.


See also:

Class wwUtils

© West Wind Technologies, 2023 • Updated: 01/04/12
Comment or report problem with topic