REGEX for bbcode links + non-bbcode URLs
问题 Tehre doesn't appear to be a clear answer on how to do this the best way. I have some bbcode which may have links in bbcode format: [url=http://thisisalink.com]link[/url] as well as possible copy/pasted urls: http://thisisalink.com I want to replace both instances with a clickable link. I currently have the following: regexs running: "/\[link=http:\/\/(.*?)\](.*?)\[\/link\]/is" "/\[link=https:\/\/(.*?)\](.*?)\[\/link\]/is" "/\[link=(.*?)\](.*?)\[\/link\]/is" $URLRegex = '/(?:(?<!(\[\/link\]|\