regex_replace not working well