0

Does someone know how to make one preg replace from this two? It should cut off: https://, http://, https://www., http://www. or only www.

preg_replace("/^www\./", "", preg_replace("/https?:\/\/(www\.)?/", "", $hostname, 1), 1);
Aldo Raine
  • 11
  • 3

0 Answers0