Rename layers by expressions from Mozilla references

Hey guys

Has anyone tried to use a custom expression for bulk renaming yet?
Figma recommends using Mozilla reference guides for this, but I can’t figure out how to use examples from there in Figma rename dialog

link is String.prototype.replace() - JavaScript | MDN

btw, question #2 is:
Is it possible to call the rename dialog for the one layer?

Thank you a lot in advance.