Quote:As per my understanding I expected words such as ORE, FRETED and REDED to pass but not words such as RENDED, DOPED or REPRO.
Why would ORE pass? There's no D in it.
Aside from that one, all your other examples pass/fail as you described. If you're not seeing that, then there's an issue with the code, not the regex.
When it comes to testing regex, I like using https://www.regexpal.com/
If you turn on the multiline flag, you can add all your examples on their own line, and FRETED and REDED light up, since they match. It helps to quickly see if a regex is doing what you think it is.
...but your regex is doing what you described it as doing. This one is pretty simple, it's when you start using things like negative lookahead groups where they can get very confusing.