try to refactor some of your regex stuff into split. it takes all the stuff you put into your replace methods