For example, I’m supposed to convert “int” to “INT”. But if there’s the word “integer”, I don’t think it’s supposed to turn into “INTeger”.
If I define "int" printf("INT"); the substrings are matched though. Is there a way to prevent this from happening?
I believe the following captures what you want.
To expand this beyond word boundaries (
{ws}, in this case) you will need to either add modifiers towsor add more specifc checks.