I have a couple of URL's that I need to obtain a specific part of the last part of the URI
If I have the url www.test.co/index.php/government-printer-sales.html
I only need to obtain government
from the URL. All url's are in the same structure so if I have www.test.co/index.php/management-fees.html
I need to obtain the word management
I tried the following
var str = document.URL.split('/');
var type = str[5].split('-',1);
which gives me some result, but I'm sure there is a better way. If there's anyway I can obtain this from eiter mootools or just plain javascript