Thank you so much for all the replies. Here is a simple benchmark for 
Brian and Jesus approaches. I Run it on ubuntu 8.04, 1GB RAM, 2 CPUs 
3.40GHz.

.....
...
require 'benchmark'
 Benchmark.bm  do |bm|

  bm.report("Brian:") do
  expand_seq "t[ac][tc]aaattaag[ga]gaag[ac]ttggtgga" do |seq|
    #puts seq
  end
 end

bm.report("Jesus:") do
  /t[ac][tc]aaattaag[ga]gaag[ac]ttggtgga/.generate
 end
 end

ser     system      total        real
Brian:  0.000000   0.000000   0.000000 (  0.000642)
Jesus:  0.000000   0.000000   0.000000 (  0.003574)
-- 
Posted via http://www.ruby-forum.com/.