From: Dave Thomas Date: 2001-08-07T04:33:11+09:00 Subject: [ruby-talk:19247] Re: re markus liedl writes: > i'm just not understanding it... > > "z u i u" =~ /(z|u|\s)+/ > p $1 You've asked it to match the longest possible string of 'z', 'u', or whitespace characters. So, it went and matched 'z u '. The last of the characters matched is ' ', so that's what is returned in $1. You can see the complete match in $& (which is indeed "z u "). Regards Dave