#1
|
|||
|
|||
Removing text before first left bracket from packagename
I'm downloading from nhentai and the package will name itself the number at the end of the URL and then the title of the hentai.
URL:**External links are only visible to Support Staff****External links are only visible to Support Staff** Resulting packagename:292763 (C93) [Himeya (Abe Inori)] Saimin Kanryou Sex Slave Order (Fate_Grand Order) [English] [xinsu] At first, I wanted to remove the URL numbers that precede title when the package name is generated. Now I want to remove everything in front of the first left bracket because I don't like the "(C93)". The regex I came up with from regexr.com was "^[^\[]+" because that grabs everything before the first bracket. Now, can I use this to delete the stuff the regex grabs, or should I use something like "\[.*" to grab everything after the bracket? I've been trying the latter like package name contains "\[.*" then set Package name <jd:orgpackagename:1>, adding the ":1" like I saw in other threads that were using <jd:orgfilename:1>, but it's not working. |
#2
|
||||
|
||||
Hi,
the following rule should do what you want: More info about our Packagizer feature: Click EDIT Additionally you should use "If sourceurl(s) -> Contains -> nhentai.net" to make sure that this rule is only applied for nhentai items!
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 05.05.2022 at 12:17. |
#3
|
|||
|
|||
Thank you! It works great. I have only one question. When I try your solution out in regexr.com, it grabs literally everything. What is the difference in the regex there and the regex on Jdownloader?
|
#4
|
||||
|
||||
@rowe4: check with regex101.com, there you can see the matching group
also on regexr.com, the tooltip shows the proper matching group
__________________
JD-Dev & Server-Admin |
#5
|
||||
|
||||
* and also make sure to select the correct flavor in regex101.com ("Java 8").
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
|
|