pattern = the number is #8 # number #### s/#[^#]+$//;