Change the name of a specific section to uppercase

Hello. I'm asking for help.
I want to capitalize between _ and by.
For example, I want to change Ab_cde by fg to Ab_CDE by fg.

Ab_cde by fg -> Ab_CDE by fg

What should I do?

Thanks.

You'll need a rename script.

function OnGetNewName(getNewNameData) {
    var arr = getNewNameData.newname_stem.match(/(.*_)(.*?)( by.*)/) || [];
    return arr.length == 4 ? arr[1] + arr[2].toUpperCase() + arr[3] : false
}

43760.orp (428 Bytes)


How to use Rename Presets from this forum

Thank you for telling me. It was of great help.

This is an additional question.
The extension is deleted.
Any solution?
thank you.

Yes.

function OnGetNewName(getNewNameData) {
    var arr = getNewNameData.newname_stem.match(/(.*_)(.*?)( by.*)/) || [];
    return arr.length == 4 ? arr[1] + arr[2].toUpperCase() + arr[3] + getNewNameData.newname_ext : false;
}

Thank you so much.