I am working on RegEx that will match a string that contains only uppercase letters and digits but not exact words ABC or XYZ or LMN.
^(?!ABC|XYZ|LMN)([A-Z0-9]+)$
This works for most of the cases but fails for input ABC12, XYZ8 etc.
How can I improve this to match the requirement.
I've referred RegEx to exclude a specific string constant but couldn't tackle this one.