Jump to content

Replace /


Pro.Luv

Recommended Posts

Hey,

 

I want to take a URL for example:

 

http://www.website.com/

 

I want to replace the last "/" so that it's like..

 

http://www.website.com

 

But I need to first check if the last "/" exists because not all the URL's I'm parsing has the slash.

I'm not really any good with Regex I appreciate any help

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/136342-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.