From: Paul Hanchett Date: 2005-04-01T05:49:49+09:00 Subject: Regex parsing question Why does this: text= "AABBCCDDEE" regex = %r{(.*)(.*)} t = text.sub( regex, "z" ); print "$1=#{$1}\n$2=#{$2}\n$3=#{$3}\n$4=#{$4}\n" Return this: $1=AABB $2=CCDDEE $3= $4= Instead of: $1=AA $2=BBCCDDEE $3= $4= And how would I fix it? Paul