dmjio
9/7/2012 - 2:30 AM

Parse url w/ js regex

Parse url w/ js regex


    //helper function
    $.parseUrl = function(str) {
        var match = str.match(/\/([^/]+)\/$/);
        var a = match[1];
        return a;
    };