Short answer: if you've got FastTemplate, don't bother re-inventing the wheel.
str_replace is a simple "replace this string with that one" function that's internal to PHP (and hence written in C and running as native machine language). Not wildly flexible, but fast and simple.
The regular expression functions ereg and preg_ are a lot more flexible, and are also internal to PHP. The tradeoff is that they are significantly slower than str_replace.
So if you want to use these, then you'll be building yourself an entire template construction/application package from scratch.
FastTemplate, on the other hand is a PHP class (written in PHP) that has already been writtn for purposes of template construction/application. If you writing something by hand to do the job, chances are that quite a bit of what you write would replicate stuff that is already in FastTemplate. If you look at FastTemplate's code, for example, you'll see that it makes judicious use of both str_replace and the ereg functions for various tasks.