Sort selections by regular expression or lexicographically
== Example
. Imagine you want to sort these stages
+
[source,groovy]
----
stage('Package (#3)') {
// ...
}
stage('Build (#2)') {
// ...
}
stage('Initialize (#1)') {
// ...
}
stage('Publish (#4)') {}
----
. Select the stage and stage body with: `%sstage<ret>MLM`
. Sort the selection by step number with: `:sort-selections #\d+<ret>` (sort on whole capture) or `:sort-selections "'.+?#(\d).+?'"` (sort on first capture group, which contains only the digits)