From: Kristof Bastiaensen Date: 2004-05-14T22:09:02+09:00 Subject: Re: Regexp Error? On Fri, 14 May 2004 20:18:55 +0900, ts wrote: >>>>>> "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 > I would say the empty string is included with "123-456", so it shouldn't give another match: echo "123-456" | sed 's/.*/X/g' X Kristof