Hi @gopal1 , in my last post, I answered the latest question that you had, which is where you were trying to do a regexReplace with OR, and I corrected that expression.
However, after re-reading the thread (it’s been a while since you asked your original question), your expression will not do exactly what my original suggestion does. Notice that in my search string, I’m looking for "Dr<space>"
, "Mr<space>"
and "HR<space>"
, while your most recent expression is not including that space.
In the case of “Dr Drew
”, my expression will return “Drew
”, which is the result you want, while your expression will return “<space>ew
”. Your expression will also remove these from the name.
Since the search is case-sensitive, this is more of an issue with Capitalized strings such as Dr, Mr, Prof, etc., but for uppercase titles such as HR, MR, DR, it should not be an issue, unless the last name is also in uppercase.
You can add a space with your search string, although you need to know if the title is a prefix or a suffix (I think MD is usually a suffix, that is it comes after the name).
For prefix titles, you want to search for “title<space>
” and for suffix titles, you want to search for “<space>title
”:
Mr: "Mr "
MD: " MD"
I’ve put something together where you can add your 250 titles in a table, and the workflow will replace them in 1 shot.
Workflow looks like this:

Sample title list (that’s where you would add your 250 titles):

Results:

You can see that Dr Drew MD came out as Drew
Here’s the workflow: List of strings to be removed from a specific column.knwf (14.7 KB)