improved -i formatting for regexes