From: seebs@... (Peter Seebach) Date: 2007-07-25T04:08:54+09:00 Subject: Re: Regex Question In message <1185303847.407283.279370@x35g2000prf.googlegroups.com>, seijin@gmai l.com writes: >Oh, I see. So using the "*" with just one ... errr... thing will >never match it? "banana" =~ /a*/ will always be 0 but "banana" =~ / >a*n/ will be 1 (one) ? Both will match. The thing to understand is that /X*/ always matches successfully no matter whether X is anchored or not, is long or a single character, or what, simply because it can always match the empty string. If it matches the beginning of a word, it will match greedily, but it won't go looking for a longer match later instead of taking the first match it finds. -s