JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06.11.2019, 22:29
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default Regex Extraxt URL

What is the Universal regex to extract each URL?
The one I use doesn't work with "www" only with http / https
Reply With Quote
  #2  
Old 07.11.2019, 11:10
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,287
Default

Please use search engine of your choice. Not that easy to have ONE universal regex because you have
-normal URL
-encoded URL
-absolut URL
-relative URL
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 07.11.2019, 11:58
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

Universal regex exists for every address in the browser. I have already used it, but I just forgot.
There is nothing complicated here, you just have to add "www" name detection.

Example:
Work Regex:
hXXps://board.jdownloader.org/
Not work regex:
hXXps://www.board.jdownloader.org/
Reply With Quote
  #4  
Old 07.11.2019, 12:01
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,287
Default

You just asked for *universal regex for URL* and that's complete different than *address in the browser*.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 07.11.2019, 12:47
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

Universal regex exists but does not work for all Search engines:
---------------------------
Error
---------------------------
Ran out of stack space trying to match the regular expression.
---------------------------
OK
---------------------------
Reply With Quote
  #6  
Old 07.11.2019, 13:48
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

Code:
(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?
Reply With Quote
  #7  
Old 07.11.2019, 13:55
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,287
Default

(https?:\/\/(www\.)?)
this pattern doesn't match for other subdomains, doesn't match relative URLs.... so it's not *Universal*
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 07.11.2019, 14:08
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz| bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy| cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov |gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|k e|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|m obi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|p a|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|s n|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us| uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn|(?:(?:[0-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(?:[0-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]))(?:[;/][^#?<>\s]*)?(?:\?[^#<>\s]*)?(?:#[^<>\s]*)?(?!\w)
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 21:36.
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 - 2024, Jelsoft Enterprises Ltd.