Replacing All Occurences of a Pattern in a Target String
Previous  Top  Next



NOTE: replace is not supported natively by PCRE: it is instead a feature provided by the Delphi wrappers.



We can use replace to replace all occurrences of a given pattern inside a target string with a given literal string

NOTE
: the Delphi classes allow you to specify a different string for each match.


To replace all instances of a pattern in a target string:

·Type the pattern to replace in the Pattern Edit Box and set any relevant compile options as described in Compiling a Pattern  
·Type the text where you want the pattern to be replaced in Target Text Edit Box  
·Set any appropriate Search Options  
·Type a replacement string in the Replacement String Edit Box  
·Press the Replace Button  
 
replace