Web development and examples of PHP, jQuery, HTML5, WordPress, MySQL & AMP


Example of detecting links in a text string with PHP preg_replace()

This is an example of the ORIGINAL POST "How to detect links in a text string with PHP".

Original string

http://www.anerbarrena.com https://www.facebook.com www.google.es @anerbarrena #anerbarrena

Filtered string with normal links

http://www.anerbarrena.com https://www.facebook.com www.google.es @anerbarrena #anerbarrena

Filtered string with normal and Twitter format links

http://www.anerbarrena.com https://www.facebook.com www.google.es @anerbarrena #anerbarrena



Cookie Policy

This website uses cookies to provide you with the best user experience. If you continue to browsing you are consenting to the acceptance of these cookies and acceptance of our cookie policy, click the link for more information.

ACCEPT
Aviso de cookies