在给定的英文文本中查找并替换所有匹配特定单词的实例，并将替换后的新文本作为字符串返回。


"This is a sample text for word replacement. The purpose of this text is to demonstrate how to replace specific words in a given text."
要替换的单词: "sample"
替换成的单词: "example"
"This is a example text for word replacement. The purpose of this text is to demonstrate how to replace specific words in a given text."