From: Glenn Jackman Date: 2010-01-12T00:35:05+09:00 Subject: Re: Regex help At 2010-01-11 07:57AM, "Robert Klemme" wrote: > 2010/1/11 Stefano Crocco : > > =A0/^[a-f\d]{4},[a-f\d]{4}$/ > > > > Note that your string can contain newlines, you must replace ^ and $ with= > \A > > and \Z respectively. > > I believe this should rather be \z because \Z allows for a follwing > newline. So that would be > > /\A[a-f\d]{4},[a-f\d]{4}\z/ ON the other hand, \Z saves you a .chomp > see http://www.geocities.jp/kosako3/oniguruma/doc/RE.txt I'd love to see that kind of documentation in the core Ruby docs. -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous