This one should be more accurate as it limits the numbers to 0-255. Though I'm a little unsure about the (?: ) part because that is what I would use in JScript to make the stuff in the brackets not get recorded seperately.
code:
/(?:1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]\.){3}(?:1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])/
EDIT: actually this one also works (for JScript at least as \d means any number)...
code:
/(?:1?\d?\d|2[0-4]\d|25[0-5]\.){3}(?:1?\d?\d|2[0-4]\d|25[0-5])/