I am getting the exception like
jslint Expected ']' and instead saw '/'.
function returnFilePath(fullPath) {
var objRE = new RegExp(/([^//]+)\\/);
var stringPath = objRE.exec(fullPath);
if (stringPath == null) {
return null;
}
else {
return stringPath[1];
}
}
Not able to find the solution for this.
Seems your regex is invalid:
(Screenshot from: https://regex101.com/)
What pattern are you trying to match? Could it be:
([^\/]+)\\