I can’t tell if this is serious or not. Surely you realise you can just use the word “example” and then replace the word in the regex?!
I'm sure an LLM can help write such a program. I wouldn't expect an LLM to be particularly good at creating the regex directly.
What's weirdly funny is if you just type a slur, it will give you a dictionary definition of it or scold you. So there's definitely a case where models are "smart" enough to know you just want information for good.
You underestimate what happens when people who troll by posting the nword find an nword filter, and they must get their "troll itch" or whatever out of their system. They start evading your filters. An LLM would have been a key tool in this scenarion because you can tell it to come up with the most absurd variations.