in reply to Regular Expression to Match IP Address

What about this?

\b[012]?[0-5]?[0-9]\.[012]?[0-5]?[0-9]\.[012]?[0-5]?[0-9]\.[012]?[0-5]?[0-9]\b

Update: Forget it, it doesn't work that way: it does not match if the second digit is above 5.

Just use Regexp::Common::net.

(lesson learned (again): don't re-invent the wheel!)

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law