From: T5in9tao Tsingtao Date: 2007-11-27T09:26:40+09:00 Subject: Re: About a regular expression Gavin Kistner wrote: > On Nov 26, 4:34 pm, T5in9tao Tsingtao wrote: >> result.each { |x| puts x } > domain_name = /[a-zA-Z0-9-]{1,63}\.(?:aero|biz|com|org)/ > > If a regular expression has capture groups in it, String#scan returns > those groups, not the entire matched expression. Placing the ?: inside > the parentheses instructs Ruby not to treat the contents as a capture > group. Thank you Gavin Kistner! That's working perfectly. -- Posted via http://www.ruby-forum.com/.