The WhatsApp part is easy to detect, but the graphics representing the phone number are harder. They can’t just be matched against certain text sequences, although technology is advancing to the point where images can be recognized. Pretty sure this was flagged with an algorithm (probably a regular expression) on the WhatsApp text.
Anyway, I’m glad it was detected. Agree with @Elena87 that it would be nice if things like this were detected before they ever got to us.