It still only replaces the first instance.

e.g.(btw --> by the way):
I entered: btw the btw
I get: by the way the btw