User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
syntax:functions:regexreplace [2020/11/26 17:47] – created dmitrysyntax:functions:regexreplace [2021/08/16 01:04] craigt
Line 1: Line 1:
-===== RegexReplace(text, replacement_text, regex_text) =====+====== RegExReplace(text, replace_text, regex_text) =====
 +Category:  Text function
-Replaces the first substring that matches the regular expression pattern with the given replacement text string.+\\  
 +This function replaces the first substring within //text// that matches the regular expression pattern (//regex_text//with the given replacement string, //replace_text//.
-^  Example  ^  Result +\\  
-| regexreplace(' 12345678', ‘ABCD’,'%%^%%\d{4}') |ABCD5678 |+=====Use cases===== 
 +//RegExMatch// is useful for fuzzy-matching and replacing substrings of text using a specific pattern of characters.
-** See also **+\\  
 +|text|Text|The text value to test for the //regex_text// RegEx pattern.| 
 +|replace_text|Text|The text value to replace any text found that matches the //regex_text// RegEx pattern.| 
 +|regex_text|Text (RegEx pattern)|The string pattern to search for within //text// The first instance of any text matching this pattern\\ is replaced with //replace_text//.| 
 +**Return value type:** Text 
 +  regexreplace('12345678', 'ABCD', '^\d{4}') //Returns 'ABCD5678' 
 +  regexreplace('MaryAnne', 'Jo', '[a-zA-Z]{4}') //Returns 'JoAnne' 
 +===== See also ===== 
 +  [[syntax:functions:isregexmatch|IsRegExMatch(text, regex_text)]] 
 +  [[syntax:functions:regexmatch|RegexMatch(text, regex_text)]]
-  * [[syntax:functions:isregexmatch]] 
-  * [[syntax:functions:regexmatch]] 
syntax/functions/regexreplace.txt · Last modified: 2022/05/20 06:56 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki