From: ts Date: 2004-05-14T20:18:55+09:00 Subject: Re: Regexp Error? >>>>> "R" == Robert Klemme writes: R> irb(main):023:0> "123-456".gsub(/.*/, 'X') R> => "XX" * first match : "123-456" * now it's at end * second match with the empty string R> irb(main):024:0> "123-456".gsub(/^.*/, 'X') R> => "X" * first match : "123-456" * now it's at end * it can't match the empty string because there is ^ in the regexp Guy Decoux