JDownloader Community - Appwork GmbH
 

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 26.05.2020, 13:45
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 82
Default Inverse of the numbers in the file name

What regex to change the inverse of the numbers in the file name?

Example: 80.ex
Inverse: 08.ex

77.ex
77.ex
54.ex
45.ex

Range: 01-80

Integer Only
  #2  
Old 26.05.2020, 13:52
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,629
Default

Sorry we're not here to teach you how RegEx works - please use online websites like regex101.com

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
  #3  
Old 26.05.2020, 13:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 67,320
Default

Search engine of your choice will provide results very fast
__________________
JD-Dev & Server-Admin
  #4  
Old 26.05.2020, 15:21
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 82
Default

I have my own script, but how to import this script into JD2 and how to run it in JD2 is already a college.
  #5  
Old 26.05.2020, 15:25
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 82
Default

@pspzockerscene - probably if it was simple - someone could give an answer in a minute, but The regexp is probably so complicated that even in google there is only special tools for this purpose. ^.^
  #6  
Old 26.05.2020, 15:32
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,175
Default

@sharkboy
all you really need to change a filename is package customiser rule, assuming you have filenames available at time links hit linkgrabber. else if you turn linkchecking off to make adding links faster, you will need to utilise the event scripter. You can even run your own script from event scripter if you choose.

the regex you need/require is very easy. it should take someone with basic knowledge less than a minute to parse integer and shift its position. Search engine comment Jiaz gave was just indication to find some documentation to assist your requirements.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #7  
Old 26.05.2020, 15:38
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 82
Default

incorrect
(?:[02468]|[13579])

Replace with:
(?:=)\1\2
  #8  
Old 26.05.2020, 15:52
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 82
Default

Reverse string double char
Cannot Find:

(?<=[0-9])(?=[^0-9]*$)
  #9  
Old 26.05.2020, 16:01
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,175
Default

a) your patterns are wrong
b) wouldn't the replace be $2$1 since $1$2 would have been the original order.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #10  
Old 26.05.2020, 16:03
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,175
Default

closing the thread, please use regex101 or similar service to write and test your patterns.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #11  
Old 26.05.2020, 16:11
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,629
Default

Additionally, my opinion on your request:
Quote:
Originally Posted by sharkboy View Post
@pspzockerscene - probably if it was simple - someone could give an answer in a minute, but The regexp is probably so complicated that even in google there is only special tools for this purpose. ^.^
No you're misunderstanding us (on purpose?)!

RegEx is something you need to learn and not something you would ask us again and again!

It's similar to math:
If you ask me "what is 3+3" and I tell you "the answer is 6", I would not like you to come back to ask me "what is 5+5" because you're supposed to learn how it works ...

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
  #12  
Old 26.05.2020, 16:52
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 82
Default How to replace the name?

Menu-> Rename link(s) (without extension)
Search for:???
Replace by:???
How to replace the name?

Example:

654387
Replace with:
6.5.4.3.8.7

123
Replace with:
1.2.3
  #13  
Old 26.05.2020, 17:11
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,629
Default

This is your last warning:
We are not here to teach you how Regular Expressions work!

To replace in downloadlist with RegEx, select all packages and pres F2.

THREAD CLOSED!

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Closed Thread

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 12:13.
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 - 2020, Jelsoft Enterprises Ltd.