You are here: PSPad forum > English discussion forum > How can I change the order automatically ?

How can I change the order automatically ?

#1 How can I change the order automatically ?

Posted by: Esgrimidor | Date: 2021-09-28 15:39 | IP: IP Logged

Albania +355
Alemania +49
Andorra +376
Armenia +374
Austria +43
Azerbaiyán +994
Bélgica +32
Bielorrusia +375
Bosnia y Herzegovina +387
Bulgaria +359
Chipre +357
Ciudad del Vaticano +379
Croacia +385
Dinamarca +45
Eslovaquia +421
Eslovenia +386
España +34
Estonia +372
Finlandia +358
Francia +33
Georgia +995
Grecia +30
Hungría +36
Irlanda +353
Islandia +354
Italia +39
Kazajistán +7
Letonia +371
Liechtenstein +423
Lituania +370
Luxemburgo +352
Macedonia del Norte +389
Malta +356
Moldavia +373
Mónaco +377
Montenegro +382
Noruega +47
Países Bajos +31
Polonia +48
Portugal +351
Reino Unido +44
República Checa +420
Rumanía +40
Rusia +7
San Marino +378
Serbia +381
Suecia +46
Suiza +41
Turquía +90
Ucrania +380

How can I obtain (by example)

+355 Albania +355
+49 Alemania +49
+376 Andorra +376
+374 Armenia +374
+43 Austria +43
+994 Azerbaiyán +994
+32 Bélgica +32
+375 Bielorrusia +375
+387 Bosnia y Herzegovina +387
+359 Bulgaria +359
+357 Chipre +357
+379 Ciudad del Vaticano +379
+385 Croacia +385
+45 Dinamarca +45
+421 Eslovaquia +421
+386 Eslovenia +386
+34 España +34
+372 Estonia +372
+358 Finlandia +358
+33 Francia +33
+995 Georgia +995
+30 Grecia +30
+36 Hungría +36
+353 Irlanda +353
+354 Islandia +354
+39 Italia +39
+7 Kazajistán +7
+371 Letonia +371
+423 Liechtenstein +423
+370 Lituania +370
+352 Luxemburgo +352
+389 Macedonia del Norte +389
+356 Malta +356
+373 Moldavia +373
+377 Mónaco +377
+382 Montenegro +382
+47 Noruega +47
+31 Países Bajos +31
+48 Polonia +48
+351 Portugal +351
+44 Reino Unido +44
+420 República Checa +420
+40 Rumanía +40
+7 Rusia +7
+378 San Marino +378
+381 Serbia +381
+46 Suecia +46
+41 Suiza +41
+90 Turquía +90
+380 Ucrania +380

maintaining or not the final +380

--
Nice program indeed

Options: Reply | Quote | Up ^


#2 Re: How can I change the order automatically ?

Posted by: pspad | Date: 2021-09-28 18:06 | IP: IP Logged

You can use Search/Replace with regular expressions:

Search: (.*)(\+\d+)
Replace: $2 $1$2
[x]Regular expressions

If you want to change order and remove number on the end, replace with:
$2 $1

$n means substitution for bracket content and number is order of the bracket

Edited 1 time(s). Last edit at 2021-09-28 18:08 by pspad.

Options: Reply | Quote | Up ^


#3 Re: How can I change the order automatically ?

Posted by: Esgrimidor | Date: 2021-09-30 14:16 | IP: IP Logged

I will try and comment. It's not easy for me. Regular Expressions is a world !!!!!

--
Nice program indeed

Options: Reply | Quote | Up ^


#4 Re: How can I change the order automatically ?

Posted by: Esgrimidor | Date: 2021-10-04 11:26 | IP: IP Logged

I am doing something wrong.

imagizer.imageshack.com

--
Nice program indeed

Options: Reply | Quote | Up ^


#5 Re: How can I change the order automatically ?

Posted by: pspad | Date: 2021-10-04 12:06 | IP: IP Logged

What does mean "somethig wrong"?
What is the result? Nothing was changed or?

You are replacing selected text - see the dialog. Did you select whole text you want to replace?
You are replacing forward, it means from the begin to the end. Is your cursor on the first line?

You can try search only, it should mark (find) whole line

Options: Reply | Quote | Up ^


#6 Re: How can I change the order automatically ?

Posted by: Esgrimidor | Date: 2021-10-04 19:49 | IP: IP Logged

Nothing happen

imagizer.imageshack.com

The cursor is at the beginning
The text is selected
but nothing happen in my pc
What am I doing wrong ?

imagizer.imageshack.com

--
Nice program indeed

Edited 1 time(s). Last edit at 2021-10-04 19:51 by Esgrimidor.

Options: Reply | Quote | Up ^


#7 Re: How can I change the order automatically ?

Posted by: pspad | Date: 2021-10-04 20:01 | IP: IP Logged

Try Find only as first. Search should select whole line

Options: Reply | Quote | Up ^


#8 Re: How can I change the order automatically ?

Posted by: Esgrimidor | Date: 2021-10-05 11:50 | IP: IP Logged

Nothing happen

imagizer.imageshack.com

--
Nice program indeed

Options: Reply | Quote | Up ^


#9 Re: How can I change the order automatically ?

Posted by: pspad | Date: 2021-10-05 12:50 | IP: IP Logged

I tested it by copy paste text from your first topic.
Maybe in your file are some special characters.

I just tested it now with selected text and cursor on the first selected line
When I start search, selection disappeared and the first line is selected.
Search next, next... marked line by line

Options: Reply | Quote | Up ^


#10 Re: How can I change the order automatically ?

Posted by: Esgrimidor | Date: 2021-10-05 14:34 | IP: IP Logged

I try again making copy and paste from the text from this post :

Albania +355
Alemania +49
Andorra +376
Armenia +374
Austria +43
Azerbaiyán +994
Bélgica +32
Bielorrusia +375
Bosnia y Herzegovina +387
Bulgaria +359
Chipre +357
Ciudad del Vaticano +379
Croacia +385
Dinamarca +45
Eslovaquia +421
Eslovenia +386
España +34
Estonia +372
Finlandia +358
Francia +33
Georgia +995
Grecia +30
Hungría +36
Irlanda +353
Islandia +354
Italia +39
Kazajistán +7
Letonia +371
Liechtenstein +423
Lituania +370
Luxemburgo +352
Macedonia del Norte +389
Malta +356
Moldavia +373
Mónaco +377
Montenegro +382
Noruega +47
Países Bajos +31
Polonia +48
Portugal +351
Reino Unido +44
República Checa +420
Rumanía +40
Rusia +7
San Marino +378
Serbia +381
Suecia +46
Suiza +41
Turquía +90
Ucrania +380

and nothing happen

imagizer.imageshack.com

Best Regards

--
Nice program indeed

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR