Right now it looks like:
var IPRegExp = new RegExp('^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$');
The periods match any character where they should only match a period, so "0w0t0g0y" passes where it should fail. The solution is to double escape the periods.
Right now it looks like:
The periods match any character where they should only match a period, so "0w0t0g0y" passes where it should fail. The solution is to double escape the periods.