I don't know about Regex but both of these ideas will return false positives sometimes.
Idea #1: If someone writes 123.. the code will think he's advertising an IP, but he isn't.
Idea #2: If someone writes 123456789 , the code will also think he's advertising, but in fact he isn't.