Javascript Regex's

Networking guru's are familiar with seeing IPv4 numbers in the traditional dotted notation. Each device on the internet is assigned its own unique IP number. Some example IP numbers:

Take a moment to inspect the embedded Javascript code below which contains a not-so-great first stab at a regex to properly match an IP number.