I am working on a dtb makros model with SQL. I have a table with contacts and someone wrote Dr. in the firstname-colum, e.g. Dr. Anna. I only want the firstname without the Dr., so I just want the name Anna in the firstname column.
I have tried to get rid of it with
regexp_replace(trim(firstname), '\bDr.\b', '')
but it is not working. On the other hand, when I tried to get rid of Pfarrer (which is the German expression for priest) Anna, it worked.
I used
regexp_replace(trim(firstname), '\bPfarrer\b', '')
for this. I only got Anna back, as I wanted.
Why does it work with Pfarrer and not with Dr.?