wwUtils::Extract

Extracts a text value between two delimiters. You can specify two ending delimiters or let the end of a line be considered an ending delimiter.

You can also optionally retrieve the string with its delimiters.

Visual FoxPro 9.0 STREXTACT

Visual FoxPro 9.0 includes a STREXTRACT function that provides similar functionality and should be used whenever possible as it's native and faster. STREXTRACT was introduced in VFP 9 based on this Extract function but behavior is slightly different. Extract calls STREXTRACT whenever possible.

Use this function over STREXTRACT if you need to have a 3rd alternate ending delimiter, or you optionally need to search to the end of the string without matching a delimiter.

o.Extract(lcString,lcStartDelim,lcEndDelim1,
          lcEndDelim2, llEndOk, llIncludeDelims)

Return Value

String between start and end delimiters. "" on error.

Parameters

lcString
String to parse.

lcStartDelim
Starting delimiter to look for.

lcEndDelim1
Ending Delimiter to look for.

lcEndDelim1
Optional second ending delimiter.

llEndOk
It .T. end of line signals ending delimiter if nothing is found before.

llIncludeDelims
Deterimines whether the delimiters matched are included in the result.


See also:

Library wwUtils

© West Wind Technologies, 2023 • Updated: 09/17/15
Comment or report problem with topic