#21
|
|||
|
|||
![]()
While analyzing or copying links from the page, JD2 does not recognize the link properly, especially if the page includes e.g. such an html tag (At the end of the address)
**External links are only visible to Support Staff****External links are only visible to Support Staff** %C2%A0 => I want to ask - how can I solve this problem with better recognition of the correct link in JD2? Example Source where there are additional links in the text: **External links are only visible to Support Staff****External links are only visible to Support Staff** |
#22
|
||||
|
||||
![]()
1.) That example link doesn't work in browser either, just shows
Quote:
__________________
JD-Dev & Server-Admin |
#23
|
|||
|
|||
![]()
Try to match any protocol but wrong: The regular expression contains mismatched '(' and ')'.
\\b((?:[a-z][\\w-]+:(?:\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]/(20[01][0-9]|202[0-2])/0*([1-9]|1[0-2])/(\\d+[-/]\\d+)|\\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]/diary/(.*)/(\\d+)-(\\d+)-(\\d+)) |
#24
|
||||
|
||||
![]()
You only need to match protocol http and https. Links without protocol are NOT processed!
And you again overcomplicate your pattern!
__________________
JD-Dev & Server-Admin |
#25
|
|||
|
|||
![]()
I have an even more elaborate regular expression that matches trillions of addresses all over the internet. But let's not go into this, it has to fit with equal protocols old and newer
http https and hxxp/.wwww Even the most complex super-complex expression will be super fast, it all depends on the engine that the program uses. How do I use complicated regular expressions with infinite strings, and yet it still works, because the developer has allowed even billions of expressions to have more and more precise expressions, processing time is several hours, but it works (depending only on CPU power) Last edited by Student im ersten Jahr; 10.05.2021 at 11:55. |
#26
|
||||
|
||||
![]()
...you clearly do not have billions of expressions...but nice try...if you would know how much time that many expressions would need....
__________________
JD-Dev & Server-Admin |
#27
|
||||
|
||||
![]()
You don't need that complex pattern because you are parsing a normal website and just want to look for URLs with specific pattern. Please learn regex by yourself!
__________________
JD-Dev & Server-Admin |
#28
|
|||
|
|||
![]()
Yutaka Emura
developer name ) **External links are only visible to Support Staff****External links are only visible to Support Staff** It's an extremely fast tool, really, but for comparison, maybe the JD2 is not making up for the speed. I add mine clearly on a regular basis and it works, if it doesn't work better in JD2 I report it problems. I don't know how to convert the sample and commented expressions because people tell me to report it to the JD2 developers. Really. Last edited by Student im ersten Jahr; 10.05.2021 at 16:02. |
#29
|
||||
|
||||
![]()
Don't report to us if you have misstakes in your patterns! Please find/fix the issues by yourself!
__________________
JD-Dev & Server-Admin |
#30
|
|||
|
|||
![]()
Other....
He's not cheating, it's all possible. Infinite regex Super developer address ivg2003 (at) hotmail.com |
#31
|
||||
|
||||
![]()
I never told he is cheating. I'm just saying that a billion expressions will take VERY LONG time.
Just to show you the math. Each expression just require 1 ms, this would end up to 11 days just to test every expression just once.
__________________
JD-Dev & Server-Admin |
#32
|
|||
|
|||
![]()
People tell me that my regular expressions work, they are correct, I wonder why the programmers tell me: turn to the programmer JD2 ETC :(
|
#33
|
|||
|
|||
![]()
But not important, this post finished
|
#34
|
||||
|
||||
![]() Quote:
You can verify them on regex101 AND don't forget to proper translate your pattern to java pattern, eg docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#jcc on regex101 you can change regex engine on the right
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 10.05.2021 at 16:25. |
#35
|
|||
|
|||
![]()
I DON'T KNOW WHY, BUT MY REGULAR EXPRESSIONS WORK IN ONE SECOND, I CLICK FIND AND GET THE RESULT IN A SECOND, IT IS VERY WEIRD, HOW IS IT POSSIBLE? It was the Japanese who invented it - not me!
Edit:Not matter please close topic. Last edited by Student im ersten Jahr; 10.05.2021 at 16:28. |
#36
|
||||
|
||||
![]()
So you have a billion expressions in your pattern? It's about several pages of text long? You know what a billion expressions does mean?
__________________
JD-Dev & Server-Admin |
#37
|
||||
|
||||
![]() Quote:
__________________
JD-Dev & Server-Admin |
#38
|
|||
|
|||
![]()
There is definitely an error because I changed \ to \\ Everyone tells me double use is dumb and stupid and try to avoid it.
|
#39
|
||||
|
||||
![]()
@Student im ersten Jahr:
When you place that pattern into JSON, you have to take care of correct encoding. Pattern, JSON Encoding, those are two different things!
__________________
JD-Dev & Server-Admin |
#40
|
|||
|
|||
![]()
This is not easy, because I see thousands of asking all over the Internet:
Example: **External links are only visible to Support Staff****External links are only visible to Support Staff** |
![]() |
Thread Tools | |
Display Modes | |
|
|