var t = \"\\some\\route\\here\"
I need \"\\some\\route\" from it.
Thank you.
Using JavaScript you can simply achieve this. Remove everything after last "_" occurance.
var newResult = t.substring(0, t.lastIndexOf("_") );