miller/test/input/reorder-prefix.csv
John Kerl a8ee858e60
reorder -r: group matched fields by regex order, not record order (#2159)
With multiple regexes, 'mlr reorder -r' previously emitted all matched
fields in record order, ignoring the order the regexes were given. Now
matched fields are grouped by regex-list order (first regex's matches
first, then the second's, etc.); within each group, fields keep their
record order. A field matching multiple regexes is claimed by the first
one. This makes 'reorder -r' consistent with 'cut -orf' and satisfies
the original request in #1325: -r '^YYY,^XXX' puts YYY-prefixed fields
first, then XXX-prefixed fields, then the rest. Applies to -e, -b, and
-a modes as well.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:07:16 -04:00

72 B

1xxx-f1xxx-f2yyy-f1yyy-f2zzz-f1bbb-f1bbb-f2ccc-f1
212345678