rename character edit to match pattern