こんにちは、ハイフンで区切られた文字列があり、文字列のlastindexを取得して新しい値に置き換えたいと思います
var str1="New-New_Folder"; //Replace New_Folder with Folder so that the str becomes
var newstr1="New-Folder";
var str2="New-New_Folder-New_Folder"; //Replace the last New_Folder with Sub_Folder so that the str becomes
var newstr2="New-New_Folder-Sub_Folder";
誰でもここで私を助けることができますか?