Ronald Mee wrote:any people can share some advises?
Well, let's take the regex,
"(?:https?|http?)://[\\w/%.\\-?&=!#]+(?!.*\\[/)", and take a look at the components, shall we ???
(?:https?|http?) -- as already mentioned, this part will also match "htt", which isn't a valid protocol type -- see previous posts.
:// -- matches a colon followed by two slashes
[\\w/%.\\-?&=!#]+ -- matches one or more of any of characters on that list. IMO, I doubt that this is right, as there is no checking to see if the url is well formed, just checking to see if certain characters are used.
(?!.*\\[/) -- a negative lookahead past the url (zero or more characters away) for a square open bracket and forward slash. What is the purpose for this?
Henry