From: shaobo.li@... Date: 2005-02-13T13:25:01+09:00 Subject: duplicated match question Hi, I am new to Ruby,and confusing about following regular patterns: why pattern "(\w)\1" match duplicated letter "ll" in "Hello" and "(\w+)\1" match "ississ" in "Mississippi"? # match duplicated letter showRE('He said "Hello"', /(\w)\1/) � He said "He<>o" # match duplicated substrings showRE('Mississippi', /(\w+)\1/) � M<>ippi def showRE(str,pt) md=str.match(pt) if str=~pt puts "#{$`}<<#{$&}>>#{$'}" else puts "no match" end end any explanation will be great thanks !