regex reformatting