URL Regex (Regular Expression)

I have been researching and fine tuning a regular expression to find http, https and ftp addresses within the body of text so that they can be shortened and automatically linked in PHP code.

This is my latest regex which seems to work OK:



  • RegexBuddy : Software for creating, testing and using regular expressions.
  • EditPad Pro : A powerful text editor especially for programming.

Share this:

Subscribe for updates

Enter your email address below. I’ll send you updates & news to your email address. You can unsubscribe at any time.






Leave a Reply

Your email address will not be published. Required fields are marked *