OP, there might be a mistake in your sorting output. You ask for the order with letters before numbers:
1Bitcoin1DomR3kFvRVUyqvF357zZes4PD
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa
But here you also have an order with numbers before letters:
1Bitco321EUbjDUQFahguAA7WEME68wx2m
1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1
So I'm going to assume you want numbers before letters. I have a perl script which can run on Unix and Linux machines since perl is already installed on most of those operating systems. Copy this into a perl console and press Ctrl-D (the "EOF" character) to run it:
use warnings;
use strict;
my @input = sort(
'1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8',
'1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1',
'1Bituiot18g2HwfVBmnb6g2eh3QRr2D853',
'1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7',
'1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa',
'1Bitcoi614uwChefc5P2Um7GBebutDdjAA',
'1Bitco321EUbjDUQFahguAA7WEME68wx2m',
'1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb',
'1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX',
'1Bitcoin13gGce1XJu6ni1EisMe5iPcguf',
'1Bit987ppKePLztu6CDe7Nq4rzkqurmjc6',
'1Bitcoin1DomR3kFvRVUyqvF357zZes4PD');
my $pattern = '1Bitcoin1';
my @output = ();
for (my $i = length $pattern; $i > 0; $i--) {
my $fragment = substr($pattern, 0, $i);
for my $j (0..$#input) {
if (index($input[$j], $fragment) != -1) {
push(@output, $input[$j]);
$input[$j] = '';
}
}
}
for my $k (0..$#output) {
print($output[$k], "\n");
}
And I also have a powershell script which I know works on Windows 7 and later, it most likely works on older versions as well. You should copy and paste this into a Powershell console because it doesn't like to run script files for some reason.
$myInput = @(
'1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8',
'1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1',
'1Bituiot18g2HwfVBmnb6g2eh3QRr2D853',
'1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7',
'1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa',
'1Bitcoi614uwChefc5P2Um7GBebutDdjAA',
'1Bitco321EUbjDUQFahguAA7WEME68wx2m',
'1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb',
'1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX',
'1Bitcoin13gGce1XJu6ni1EisMe5iPcguf',
'1Bit987ppKePLztu6CDe7Nq4rzkqurmjc6',
'1Bitcoin1DomR3kFvRVUyqvF357zZes4PD');
$myInput = $myInput | Sort-Object -Property { [char[]] $_ }
$myPattern = '1Bitcoin1';
$myOutput = @();
for ($i = $myPattern.length; $i -gt 0; $i--)
{
$fragment = $myPattern.Substring(0,$i);
for ($j = 0; $j -lt $myInput.Count; $j++)
{
if ($myInput[$j].IndexOf($fragment) -ne -1)
{
$myOutput += $myInput[$j];
$myInput[$j] = '';
}
}
}
Write-Output $myOutput
Both of these will print the following output, numbers before letters, without the boldface formatting:
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa
1Bitcoin1DomR3kFvRVUyqvF357zZes4PD
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8
1Bitcoi614uwChefc5P2Um7GBebutDdjAA
1Bitco321EUbjDUQFahguAA7WEME68wx2m
1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1
1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX
1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb
1Bit987ppKePLztu6CDe7Nq4rzkqurmjc6
1Bituiot18g2HwfVBmnb6g2eh3QRr2D853