> The part that finds the repeating patterns is a bit ugly, but it should  
> work. Here are the results:
You did not see the java version... Now THAT'S ugly ;-)
> 
> $ ruby generalize_rx.rb
> 12345 => /\d+/
> ABCDE => /[A-Z]+/
> john.smith / my.super.server.rb => /[a-z]+\.[a-z]+@([a-z]+\.)+[a-z]+/
> 123-45-678-90 => /(\d+\-)+\d+/
> item: => /[a-z]+:/
> Peter, SZINEK => /\w+,\ [A-Z]+/
> http://www.google.com => /[a-z]+:\/\/([a-z]+\.)+[a-z]+/
> jdd:L348kddd3 => /[a-z]+\243;[a-z]:\w+/

Wow! Thanks man! Nice solution. Ruby is awesome.

Cheers,
Peter