As I was working on developing dojo application modules, I came across a regular expression in tutorials.
var pathRegex = new RegExp(/\/[^\/]+$/);
var locationPath = location.pathname.replace(pathRegex, '');
var dojoConfig = {
async: true,
packages: [
{
name: 'modules',
location: locationPath + '/js/modules'
}
};
I am curious about the meaning of this regular expression and how it is being used to replace paths. RegExp(/\/[^\/]+$/)