It seems like you discovered that regex is not the right tool for keyword detection or replacement :)
I like how you explain the role of tries in you eventual solution. I learned from your 'mistake', so thanks for writing.
Thanks :) Completely agree that one size fit all doesn't work. It's just that when we start, we start with a simpler problem and sometimes to scale we need to re-think at an algorithmic level.
PS: Thanks for your feedback :)
We’re a place for programmers to stay up-to-date, learn new skills, and share ideas.
We’ll never post without your permission.