Hi,

In message "grep regex to ruby regex..."
    on 02/07/03, Todd Holloway <todd / duckland.org> writes:

|I'm just about to finish up my first ruby program, but I'm
|stuck on one last part...I need equivlent of the below in ruby:
|
|grep -v "^[[:space:]]*#" filename | grep -v '^[[:space:]]*$'

File.foreach(filename) do |line|
  next if /^\s*#/ =~ line
  next if /^\s*$/ =~ line
  print line
end

							matz.