Sort numbers in ascending order with Regex
-
good day, did anyone know how to sort numbers in ascending order with Regex?
foe example:
5097 5794 5531 2235 2234 1234 1233after using regex this must be the output:
1233 1234 2234 2235 5097 5531 5794 -
Why do you want to use “regex”? Regex doesn’t know about “sorting” or about values of numbers, so it is a tough task.
Have you tried Edit (menu) > Line Operations > Sort Lines As Integers Ascending ??
-
hello. nice. I didn’t know this task on notepad++. Thanks ;)
-
anyway, it would have been useful in regex, though, especially if I have multiple tables similar in multiple files. it is difficult to modify each one individually.
-
@Bebee-Bebrto said in Sort numbers in ascending order with Regex:
it would have been useful in regex, though, especially if I have multiple tables similar in multiple files. it is difficult to modify each one individually.
Well, for that scenario I probably would write an external program to do it and not bother with Notepad++ at all.
-
the idea, maybe, is to make all Edit Options to make replacement in all files, not just in one file.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login