Added the "flags" parameter for the {@replace} helper.