EControl Syntax Editor SDK
TecRegExpr.Substitute Method

Returns template with replaced escape sequences and sub-expression metacharacters.

function Substitute(const InputString: ecString; const ATemplate: ecString): ecString;

This method is intended to use in "Replace with template". 

Replace string will be constructed from template. In template you can use Escape characters (examples: \n \t \r \xA4, \x{A}) and sub-expression strings (\0 \1 \2 ...) like in Regular Expressions. \0 - inserts in replace string whole found match, \1 - inserts first sub-expression match and so on.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!