#1
|
|||
|
|||
packagiser - multiple downloadurls
I would like to create a packagiser rule e.g VideoStream
where the Downloadurl can contain any number of video streaming sites e.g. Downloadurl contains *youtube* OR *dailymotion* OR *vevo* etc.. I have tried writing the rule like this *youtube*, *dailymotion*, *vevo* Regex *youtube*|*dailymotion* | *vevo* Unfortunately none of this works or is considered valid.. Can someone please help? |
#2
|
||||
|
||||
regex you can not use * as wildcard, in regex its used as repeat character (0 to many)
Code:
youtube|dailymotion|vevo
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#3
|
|||
|
|||
Quote:
thanks.. regex is quite complex, learning something new every day.. So is the wildcard in regex = ? Regex = a?b matches = aaab, aaaaaaaab Real Example.. regex = ?youtube? matches Code:
**External links are only visible to Support Staff**www.youtube.com youtube.com youtube.com/?sklajdlksaj youtubessssss.com Last edited by madmax2; 26.11.2017 at 01:19. |
#4
|
||||
|
||||
question mark character in regex is used as a 'may or may not be present'. Working example: 'a{0,1}b == a?b' will match b and ab
try googling for some regex materials, this website isn't bad _**External links are only visible to Support Staff**
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] Last edited by raztoki; 26.11.2017 at 09:30. |
#5
|
|||
|
|||
Quote:
So does this example is valid or not? Regex = a?b matches = aaab, aaaaaaaab Real Example.. regex = ?youtube? matches Code:
**External links are only visible to Support Staff**www.youtube.com youtube.com youtube.com/?sklajdlksaj youtubessssss.com ==== what website? all I see is this _**External links are only visible to Supporters** Why does jdownloader forum hide links? it is very annoying when I try to use some website examples and it hides it, had to a added a code tag. |
#6
|
||||
|
||||
In regular expressions, the period (., also called "dot") is the wildcard pattern which matches a single character. Combined with the asterisk operator .* it will match any number of characters.
So try .*?youtube.* The hidden link: regex101.com
__________________
FAQ: How to upload a Log |
#7
|
|||
|
|||
Quote:
it looks like you don't need the question mark..why did you add it to beginning but not the end of that regex? e.g. .*?youtube.*? this regex matches the 5 example links I posted above .*youtube.* ==== also why does the forum hide links? |
#8
|
||||
|
||||
if you use contains field you do not need to use wildcards, as its already a partial match, only need to use it for equals. so the example in post 2 is correct, though can be open to false positives eg. abcefg.com/youtube/something.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#9
|
||||
|
||||
Non whitelisted URLs are only visible to staff/support members
__________________
JD-Dev & Server-Admin |
#10
|
|||
|
|||
Yeah that is what the messages saids
it does not explain the reason why though... Is it you are concern that people might post illegal download links? |
#11
|
||||
|
||||
Many reasons. For example privacy of users, because some ppl simply post urls to screenshots/pastebins with personal information. Keep scanners away and avoid legal trouble with links to content
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|