JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 18.11.2011, 15:32
fanatic_
Guest
 
Posts: n/a
Default help with package customizer

I need help to write RegEx for Package Customizer... I am downloading stuff from links like this one:

hxxp://www.somesite.com/my-holy_grail/filename.ext

Is it possible to create package with name "my_holy_grail" using RegEx and Package Customizer ? Can someone help me to set this correctly?

Last edited by fanatic_; 18.11.2011 at 15:42.
Reply With Quote
  #2  
Old 18.11.2011, 15:57
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,549
Default

hi
If you like a tight regep use '(?i).*?my\-holy\_grail.*?' which will only pick up 'my-holy_grail' or if your used to wildcard expression *my-holy_grail* within url.

or if the characters separating are not always the same you can try '(?i).*?my.*?holy.*?grail.*?' this will pick up combinations in sequence of 'my holy grail' or with traditional wildcard expression '*my*holy*grail*'.

You can use/set any package name with matches.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 20.11.2011, 00:22
fanatic_
Guest
 
Posts: n/a
Default

thank you for help, but my links are just a little bit different

hxxp://content.somesite.com/2011/10/SomethingHere/filename.mp4

In my previous post I didn't give you a good example, here is almost same link which I am downloading.... So, SomethingHere should be my Package Name and it can contain underline, dots, etc (. , - , _ , ...) if it does matter
How to code that?
If I understand you I should put your Regex code to Regex Field in jD and what is going to Package Name field?

thanks for help in advance
Reply With Quote
  #4  
Old 20.11.2011, 01:40
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,549
Default

so use my second example it will allow any other characters (unlimited) in between and either side those words. You can also use '[\.\-\_]+' if you rather to only limit too those characters, using '\' escapes the normal use within regep so its means the character instead and '+' means unlimited times

original example (removed leading/ending .*? as its not needed)
'(?i)my.*?holy.*?grail'

or this
'(?i)my[\.\-\_]holy[\.\-\_]grail' so this works for one of the characters within [] its only repeated once. Add '+' at the closing of square bracket []+ for unlimited or use []{3} for repeated 3 times

might be best to just google regular expressions. Plenty info online about it
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #5  
Old 20.11.2011, 02:10
fanatic_
Guest
 
Posts: n/a
Default

OK, I will google it...

I will put regex code to Regex field in jD, but what I need to put in Package Name field in jD?
Reply With Quote
  #6  
Old 20.11.2011, 02:13
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,549
Default

anything you want, this will be static
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
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 08:23.
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 - 2023, Jelsoft Enterprises Ltd.