From: Stefano Crocco Date: 2008-01-04T06:27:27+09:00 Subject: Re: Why does this code not return what I expect it to? Alle giovedì 3 gennaio 2008, Sam Phoneix ha scritto: > Heres the code. Why does it miss out the "a" character? > ------------------------------------------ > "This is a test".scan(/\w\w/) {|x| puts x} > ------------------------------------------ > Thanks I guess because the space before the 'a' is not a word character, so ' a' can't match /\w\w/. Stefano