mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 08:55:41 +00:00
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>
72 B
72 B
| 1 | xxx-f1 | xxx-f2 | yyy-f1 | yyy-f2 | zzz-f1 | bbb-f1 | bbb-f2 | ccc-f1 |
|---|---|---|---|---|---|---|---|---|
| 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |