FIX: Replace use of regular expression (PR #12838)

It used a regular expression to check if message IDs were in RFC format.

GitHub

Excellent :+1:

Maybe also ask Martin to review since blame says he create that method?

LGTM :+1: I should be banned from using Regex altogether TBH :cold_sweat: