JDownloader Community - Appwork GmbH


Thread Tools Display Modes
Old 12.04.2020, 20:39
Sekuiya Sekuiya is offline
Modem User
Join Date: Apr 2020
Posts: 1
Default How to name the file with only the alphanumeric characters of the url

So, I'm a beginner in this whole regular expression deal, but here's my problem.

I need to name my files in according to their source urls, more specifically I need to remove all non-alphanumerics characters.

An example:
I have this file
**External links are only visible to Support Staff**
and I need it's filename to be

Looking up online sites I was able to reach at this regular expression that would match all my desired characters, "([^\W_])". Now my problem is transferring this to the file name.

I was using "<jd:source:1>.<jd:orgfiletype>" but this unfortunately only gives me a "h.png". I tried looking some kind of tutorial but all I could find of <jd:source:1> was answers in the forums so I've reached a wall.

Any help would be appreciated, thank you very much!
Reply With Quote
Old 13.04.2020, 04:14
raztoki's Avatar
raztoki raztoki is offline
English Supporter
Join Date: Apr 2010
Location: Australia
Posts: 17,251

your first regex condition only repeats for single character hence why just h is returned, use + as repeat. not sure you can achieve your desired outcome to be honest, since you don't exactly know how many times its going to repeat. For instance how many / and ? (illegal chars). Since you need to do jd:source:x for each repeat. either you need to create many rules to cover said repeats, or it might be easier to achieve with eventscripter (javascript) extension module.
raztoki @ jDownloader reporter/developer

Don't fight the system, use it to your advantage. :]

Last edited by pspzockerscene; 14.04.2020 at 14:31. Reason: Hyperlinked EventScripter
Reply With Quote

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 06:46.
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 - 2021, Jelsoft Enterprises Ltd.