in reply to Regex Substring SORT Conundrum
(I haven't checked the correctness of the regex)map { /^(.*)(?>(?:\s.{1,5}(:\d+)*.*))/; [$_, $sortdata{$1}, $2, $3] }
then the sort becomes as easy as
and then remap the values with map { $_->[0] }. This of course is done in reverse order, but right to left is how I think of constructing the Transform.sort { $a->[1] <=> $b->[1] || $a->[2] <=> $b->[2] || $a->[3] <=> $b->[ +3] }
Does that make sense?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex Substring SORT Conundrum
by Polyglot (Chaplain) on Mar 05, 2015 at 16:45 UTC | |
by MidLifeXis (Monsignor) on Mar 05, 2015 at 18:03 UTC | |
by Ea (Chaplain) on Mar 06, 2015 at 09:51 UTC | |
by bitingduck (Deacon) on Mar 05, 2015 at 19:01 UTC |