replacewordexact(
TEXT
,
OLDWORD
,
NEWWORD
)

The replacewordexact( function replaces a word with a new word.


Parameters

This function has three parameters:

text – is the item of text that contins the words you want to search for and replace.

oldword – the original word.

newword – the new word.


Description

This function replaces a word with a new word. Only entire words are replaced. The function knows about punctuation. Unlike the replaceword( function, this function requires an exact match, including capitalization.

replacewordexact("Who is Mary Smith?","Mary Smith","Mary Wilson") ☞ Who is Mary Wilson?
replacewordexact("Who is Mary Smithson?","Mary Smith","Mary Wilson") ☞ Who is Mary Smithson?
replacewordexact("Old MacDonald had a farm.","MacDonald","Frank") ☞  Old Frank had a farm. 
replacewordexact("Old MacDonald had a farm.","MacDonald","frank") ☞  Old frank had a farm. 
replacewordexact("Old MacDonald had a farm.","macdonald","Frank") ☞  Old MacDonald had a farm. 

If you need a function that is case insensitive and can match the existing capitalization of the text being replaced, see the replaceword( function.


See Also


History

VersionStatusNotes
10.0NewNew in this version.