JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #81  
Old 17.06.2019, 22:18
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

Quote:
Originally Posted by Jiaz View Post
Ever thought about regex NOT being the answer for all of your *stuff*?
Why don't use regular expressions? I can use
convertors to create one click reverse string without programming knowledge



At the moment, something like that, but it's really bad, because it changes only the place of every number.
https://i.postimg.cc/Z5FkBYm1/Screen...t-08-31-PM.jpg
Reply With Quote
  #82  
Old 17.06.2019, 22:21
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

and also bad output:

Code:
#include <stdio.h>
int main()
{
    int n, reversedNumber = 0, remainder;

    printf("Enter an integer: ");
    scanf("%d", &n);

    while(n != 0)
    {
        remainder = n%10;
        reversedNumber = reversedNumber*10 + remainder;
        n /= 10;
    }

    printf("Reversed Number = %d", reversedNumber);

    return 0;
}
Output

Enter an integer: 2345
Reversed Number = 5432
Reply With Quote
  #83  
Old 21.06.2019, 10:28
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

(\d+),(\d+),(\d+),(\d+)
\4,\3,\2,\1

In this case, it works for the four numbers in the set, and what does it do to work for any set without having to modify the regex for the different sets?
Reply With Quote
  #84  
Old 21.06.2019, 11:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

I'm not aware that this is possible at all, I mean dynamic number of hits/replacements. That's what I meant by
Quote:
Originally Posted by Jiaz View Post
Ever thought about regex NOT being the answer for all of your *stuff*?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #85  
Old 21.06.2019, 17:27
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

VBA Script written, only that how to use it in EmEditor
* (instead of Excel)?
Spoiler:

Code:
sub descending()
max = Application.WorksheetFunction.CountA(Range("A1:A65536"))

d³ = Application.WorksheetFunction.CountA(Range(Cells(1, 1), Cells(1, 80)))
For i = max To 1 Step -1
Range(Cells(i, 1), Cells(i, d³)).Select
Selection.Sort Key1:=ActiveCell, Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight
Next i
end sub
Reply With Quote
  #86  
Old 23.06.2019, 13:06
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

The situation now looks like the new "Reverse String" script works, but I have changed to the 32-bit version of the Editor, otherwise it will not work on 64-bit.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 15:12.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.