I am looking to remove "pharmacy" from an input field before I enter the text into the database.
Example - "Ciaran pharmacy" will show as "Ciaran".
Your requirements are pretty simple:
<cfscript>
name = "Ciaran pharmacy";
newName = replace(name, 'pharmacy', '');
</cfscript>
I suspect there's more complication to it than that.
If it's the 3rd case, specify the 'ALL' parameter:
newName = replace(name, 'pharmacy', '', 'ALL');