From: Zach Dennis Date: 2004-02-04T06:47:58+09:00 Subject: Re: String.hex and valid mac addresses : a cleaner way ? Here's the shortest version i could come up with: while gets puts "Reading in #{$_.chomp}:" $_.split(/:/).each{ |element| ( element =~ /^[\da-fA-F]{2}$/ ) or puts "\tFound bad element #{element}" } end =) Zach