To extract URLs (not a perfect solution but I’m almost satisfied as performance counts) I use
preg_match_all('#bhttps?://[^,s()<>]+(?:([wd]+)|([^,[:punct:]s]|/))#', $string, $match);
code to extract URLs.
However, it’s not a perfect solution for me as URLs should be forced to cut up to
"|" if any of these two symbols met in the extracted URL.
I know these symbols are valid symbols in URLs, however for my case they should be invalid.
How should the
preg_match_all above be slightly modified to know about these two delimiters?