How to avoid plural "s" on string replace

Thank you for your reply, @sandra

I understand what you are saying. However, I found that some words cannot be replaced, such as “submit”.

Additionally, there are some issues with replacing priorities. I want to replace “class” with “lesson” and “form” with “class,” but it is not feasible in actual use.