human
How to extract first two characters from string using regex
assistant
Here is some code to use regex pattern '^12(?=.{4}$)' to remove digit 12 if followed by 4 other digits in column `c_contofficeID` of dataframe `df`

df.c_contofficeID.str.replace('^12(?=.{4}$)', '')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.