In EmEditor Professional, how do you sort the ascending and descending order by the number of symbols?

Asked 2 years ago, Updated 2 years ago, 344 views

How do I do the following with EmEditor Professional?

For example, suppose you have lines with symbols and numbers as follows:
At this time, for example, would it be possible to sort the numbers in ascending and descending order in the numerical order of the number part of the symbol ▲?

This is how the smaller numbers are automatically sorted up.

before sorting:

▼Attach▲920●920▽6458◆Attach■
▼Nerikomiya▲957●957▽3978◆Nerikomiya■
▼Wipe off▲1023●1023▽4098◆Wipe off■

after sorting:

▼Wipe off▲1023●1023▽4098◆Wipe off■
▼Nerikomiya▲957●957▽3978◆Nerikomiya■
▼Attach▲920●920▽6458◆Attach■

emeditor

2022-09-30 21:55

1 Answers

EmEditor-Search

EmEditor-CSV/Sort

If you want to do the above in one operation, you can also do the following macros:

 document.selection.Find("(?<=▲)\\d+", eFindReplaceRegExp | eFindSelectAll, 0);
document.Sort("N+", eSortSelectionOnly);

Here's how to run the macro:


2022-09-30 21:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.