Bitcoin Forum
May 26, 2024, 09:45:21 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Notepad++ sort by the largest number of the same results  (Read 240 times)
inlovewiththedj (OP)
Member
**
Offline Offline

Activity: 93
Merit: 12


View Profile
March 24, 2020, 01:23:24 PM
 #1

Hello

I have a question about software or script for sorting addresses.

Now I'm using Notepad++ but it is difficult to sort in my way.

For example

I have few addresses

Code:
1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8
1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1
1Bituiot18g2HwfVBmnb6g2eh3QRr2D853
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa
1Bitcoi614uwChefc5P2Um7GBebutDdjAA
1Bitco321EUbjDUQFahguAA7WEME68wx2m
1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb
1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bit987ppKePLztu6CDe7Nq4rzkqurmjc6
1Bitcoin1DomR3kFvRVUyqvF357zZes4PD

How to sort text in Notepad ++ (or other tool) like in bellow
at the very top after sorting there will be addressess with the names most often repeating or closest,
then subsequent, subsequent and subsequent ones as in the example below

So
How to sort to this way:


1Bitcoin1DomR3kFvRVUyqvF357zZes4PD
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa
1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8
1Bitcoi614uwChefc5P2Um7GBebutDdjAA
1Bitco321EUbjDUQFahguAA7WEME68wx2m
1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1
1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX
1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb
1Bita87ppKePLztu6CDe7Nq4rzkqurmjc6
1Bituiot18g2HwfVBmnb6g2eh3QRr2D853

Pmalek
Legendary
*
Offline Offline

Activity: 2772
Merit: 7158



View Profile
March 24, 2020, 06:39:09 PM
 #2

I don't have access to my other PC where I have Notepad++ installed on but if I remember correctly there are various different ways you can sort data by clicking on Edit > Line Sorting > and then you have a bunch of different options. Click through those to see if it manages to sort the addresses the way you want it to.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
inlovewiththedj (OP)
Member
**
Offline Offline

Activity: 93
Merit: 12


View Profile
March 24, 2020, 07:25:52 PM
 #3

I don't have access to my other PC where I have Notepad++ installed on but if I remember correctly there are various different ways you can sort data by clicking on Edit > Line Sorting > and then you have a bunch of different options. Click through those to see if it manages to sort the addresses the way you want it to.

I have tried your method and not arranged as I want
like in my example
HeRetiK
Legendary
*
Offline Offline

Activity: 2940
Merit: 2092



View Profile
March 24, 2020, 08:53:59 PM
Merited by joniboini (4), bones261 (4), vapourminer (1), ABCbits (1)
 #4

You'll probably have to use a script for the kind of sorting you are looking for.

Here, I've hacked a little something together that you can use as a starting point:

Code:
var input = ['1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8',
'1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1',
'1Bituiot18g2HwfVBmnb6g2eh3QRr2D853',
'1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7',
'1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa',
'1Bitcoi614uwChefc5P2Um7GBebutDdjAA',
'1Bitco321EUbjDUQFahguAA7WEME68wx2m',
'1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb',
'1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX',
'1Bitcoin13gGce1XJu6ni1EisMe5iPcguf',
'1Bit987ppKePLztu6CDe7Nq4rzkqurmjc6',
'1Bitcoin1DomR3kFvRVUyqvF357zZes4PD'];

var pattern = '1Bitcoin1';

var output = [];
var inputCopy = input.concat();
inputCopy.sort();

for (var i = pattern.length; i > 0; i--) {
  var fragment = pattern.substr(0, i);
  for (var j = 0; j < inputCopy.length; j++) {
    if (inputCopy[j].indexOf(fragment) > -1) {
    output.push(inputCopy[j]);
inputCopy[j] = '';
    }
  }
}

var container = document.getElementById('container');

output.forEach(item => {
  var text = document.createTextNode(item);
  container.appendChild(text);
  var br = document.createElement('br');
  container.appendChild(br);
});

NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
March 29, 2020, 06:22:11 PM
 #5

OP, there might be a mistake in your sorting output. You ask for the order with letters before numbers:

Quote
1Bitcoin1DomR3kFvRVUyqvF357zZes4PD
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa

But here you also have an order with numbers before letters:

Quote
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:

Code:
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.

Code:
$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:

Quote
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa
1Bitcoin1DomR3kFvRVUyqvF357zZes4PD
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8
1Bitcoi614uwChefc5P2Um7GBebutDdjAA
1Bitco321EUbjDUQFahguAA7WEME68wx2m
1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1
1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX
1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb
1Bit987ppKePLztu6CDe7Nq4rzkqurmjc6
1Bituiot18g2HwfVBmnb6g2eh3QRr2D853

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 29, 2020, 08:16:55 PM
 #6

How to sort text in Notepad ++ (or other tool) like in bellow
at the very top after sorting there will be addressess with the names most often repeating or closest,
then subsequent, subsequent and subsequent ones as in the example below

Which is more important to the sort? "closest match" or the "most often repeating"... Huh

I'm guessing it is "closest match" as in your example you have 2x "1Bitco" and "1Bitc" but they are sorted AFTER only 1x "1Bitcoi"
Quote
1Bitcoin1DomR3kFvRVUyqvF357zZes4PD
1Bitcoin1H54ZwxFMDFod8vtz55dweqnz7
1Bitcoin13gGce1XJu6ni1EisMe5iPcguf
1Bitcoin17ybmkj3qH7VyT5XjdnXaz3ZBa
1BitcoinJNVRfTPxCJeA5UsSA5g4Twu8h8
1Bitcoi614uwChefc5P2Um7GBebutDdjAA
1Bitco321EUbjDUQFahguAA7WEME68wx2m
1Bitcopt1Pf7RmFmisdQxaZUKqhW4tLBB1
1Bitc1in15tA5fiT9JxENbMqnPu4QyfgPX
1Bitc48n1Q2Kr5Erk8GrFACcGVSiEjkDWb
1Bita87ppKePLztu6CDe7Nq4rzkqurmjc6
1Bituiot18g2HwfVBmnb6g2eh3QRr2D853

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Soldierswitlittlefaith
Member
**
Offline Offline

Activity: 239
Merit: 27


View Profile WWW
March 29, 2020, 08:40:24 PM
 #7

i have always wanted to save time when sort out saved doc(especially user id & pw) on pc

but, i've tried wordpad, wordpad++ but, this does not seem to provide any exact result based on the saved doc.

However, i find blocknote & wordpad++ to be a little bit more effective but, you need to use the small search box on your pc/notebook in order  to access the exact save doc based on the search term.

Note : searching for the save term directly by opening the doc will not yield full result.

Thanks
Soldierwitlittlefaith
Chlotide
Full Member
***
Offline Offline

Activity: 305
Merit: 106



View Profile
March 30, 2020, 12:16:43 AM
 #8

i have always wanted to save time when sort out saved doc(especially user id & pw) on pc

I would really advise to use a password manager in this case. Text document for user+pass is a definite no-no
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!