SyntaxFix
Write A Post
Hire A Developer
Questions
Matching a URL in a text should not be so complex
(?:(?:(?:ftp|http)[s]*:\/\/|www\.)[^\.]+\.[^ \n]+)
https://regex101.com/r/wewpP1/2