I Know, Let’s Use Regular Expressions!
So you’re looking at words, which, at least in English, means you’re looking at strings of characters. You have rules that say you need to find different combinations of characters, then do different things to them. This sounds like a job for regular expressions!
Get hands-on with 1400+ tech skills courses.