From: Josh Cheek Date: 2010-11-21T15:18:39+09:00 Subject: Re: Problem regarding regular expression --0016e646514830e59004958a1cd6 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Nov 20, 2010 at 7:41 PM, Stanford Ng wrote: > puts( /^[a-z 0-9]*$/ =~ 'Well hello 123' ) # no match due to ^ and > uppercase 'W' > > > puts( /^[a-z 0-9]*/ =~ 'Well hello 123' ) # * zero (or more) matches at > start ^ = 0 > > i could barely understand why the existence of $ makes such a > difference. > any help? > > -- > Posted via http://www.ruby-forum.com/. > > Why don't you play with it at rubular.com for a while, it will help you to see easier what is happening when you change your regexp. http://rubular.com/r/2f1DxHl33E --0016e646514830e59004958a1cd6--