This question was marked as duplicate.
The person closing it simply points at a question on "how to learn regular expressions".
This is not a simple question. The closest answer so far uses negative lookaheads and \b
. By that measure, nearly all questions on Stackoverflow would be dupes. Closing this as a duplicate with that link is just rude.
The real frustrating thing is after playing around with the ideas in the top answer I now do have the full real answer but I can't answer it for other people who might have this question in the future, because the mod got trigger happy.
what does
.` mean in regex` shouldn't be a duplicate of that.[^foo]
negation pattern but I tried it enough to understand that it was the wrong direction entirely)