Consider using Regular expressions to detect DOIs on websites to avoid additional characters (ex: dot at the end) breaking the logic.