Progress refactoring regex for formatting text