Forum Moderators: coopster
This is doing a good job with http and https:
preg_replace('¦https?:[/]+¦i', '', $url_to_check);
This is returning an empty string:
preg_replace('¦(http¦ftp)s?:[/]+¦i', '', $url_to_check);
How do I fork the regex to test for different possibilities? Is there a better way to do this?
Oddly, google tells me I searched for "preg_replace remove http" last October, but I can't remember how I solved it then. :/