Code:

Press button to see use of replace function

Some text will be replaced on click...