The following works for a string with nth 'url' parts.
var fragment = '/t/e/s/t/i/n/g/';
var fragment = '/t/';
If the fragment is of variable length, you need a solution that works for various fragment sizes.
var fragment = '/news/article-1/';
var array_fragment = fragment.split('/');
Split separates the fragment string where it finds '/'s. Split takes the value before and after the split character. In this case there is nothing before the first slash or after the last slash. The empty values are added to the array_fragment in the first and last array positions.
jQuery
var pg_url = $(array_fragment)[$(array_fragment).length - 2];
javascript
var pg_url = array_fragment[array_fragment.length - 2];
As you can see, jQuery is not needed for this solution.
Array_fragment.length - 2 is counting the length of the array_fragment, and selecting the second item from the end. The last value is "" due to Split('/') adding an empty value to the end of the array_fragment array.
Simplified and all put together:
var f = '/t/e/s/t/i/n/g/'.split('/');
f[f.length - 2]