Category: Text function
This function replaces the first substring within text that matches the regular expression pattern (regex_text) with the given replacement string, replace_text.
RegExMatch is useful for fuzzy-matching and replacing substrings of text using a specific pattern of characters.
Argument | Type | Description |
---|---|---|
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
EasyMorph uses the .NET regex language.
regexreplace('12345678', 'ABCD', '^\d{4}') //Returns 'ABCD5678'
regexreplace('MaryAnne', 'Jo', '[a-zA-Z]{4}') //Returns 'JoAnne'