Add / to end of url

Topics: Developer Forum, User Forum
Apr 8, 2009 at 4:33 PM
Hi everyone,

I have a few urls

http://www.xxx.com/blog/u2-world-tour
http://www.xxx.com/
http://www.xxx.com
http://www.xxx.com/events/festivals
http://www.xxx.com/events/festivals/
http://www.xxx.com/events/concerts/hard-rock-&-metal/36
http://www.xxx.com/events/concerts/hard-rock-&-metal/36/
http://www.xxx.com/blog/
http://www.xxx.com/blog

I want to add a forward slash to the end for all the urls that dont have one.

So I think im looking for something like this;

- find last character
- if its a / ignore
- if it isnt add one

Can anyone help with the REGex for this?

Thanks

Joe
Coordinator
May 1, 2009 at 9:24 AM
Check the examples shipped in the download; I think there is one that fits this scenario.