Jump to content

regexp replace


The Little Guy

Recommended Posts

I have a database, and in it are urls. I want to reformat all the urls, how can I do that?

 

right now they look like this:

http://site.com/somepage.php

or like this:

http://www.site.com/somepage.php

 

I want to remove the http:// so it looks like this:

site.com/somepage.php

 

I was hoping there was a regexp_replace or something but their is not. What would be the best way to do this?

Link to comment
https://forums.phpfreaks.com/topic/227472-regexp-replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.