wwRegEx::aStripExpressions

Picks out all expressions matched and replaces them with a specified string returning the matched strings as an array.

Useful in temporary document parsing when you need to strip out portions of a string perform formatting and then replace the original content.

Use aRestoreExpressions to restore the stripped expressions from the array.

o.aStripExpressions(@laMatches,@laText,lcPattern,lcReplaceWith)

Return Value

Number of matches

Parameters

@laMatches
An array that receives the matched expressions. Pass by Reference

@lcText
The text to work on. Pass by reference so the changes are reflected when the call returns.

lcPattern
The RegEx pattern to find matches with.

lcReplaceWith
The static text to replace each match instance with.


See also:

Class wwRegEx

© West Wind Technologies, 1996-2019 • Updated: 12/21/07
Comment or report problem with topic