JSFiddle - React, Tailwind, and code Playground
JavaScript
var x = "C:\\Documents and Settings\\Dig\\Desktop\\XMLFileName.xml";
var filename = x.split('\\').pop().replace(/\..+$/, '');
document.body.innerHTML = filename;
var x = "C:\\Documents and Settings\\Dig\\Desktop\\XMLFileName.xml";
var filename = x.split('\\').pop().replace(/\..+$/, '');
document.body.innerHTML = filename;