On Jun 29, 2006, at 4:57 PM, Christian Neukirchen wrote: > Eric Hodel <drbrain / segment7.net> writes: > >> On Jun 28, 2006, at 1:10 PM, A. S. Bradbury wrote: >> >>> On Wednesday 28 June 2006 20:56, Pete wrote: >>>> just too bad the rdoc is inaccurate and says that delete takes a >>>> string >>>> as argument and not a regexp >>> >>> That's actually correct. At first glance I thought it just >>> constructed a regex >>> from the given string (due to its understanding of character >>> ranges). >>> Instead, both String#count and String#delete take this kind of >>> pseudo-regex. >>> Is there a reason it wouldn't make more sense for these methods to >>> take a >>> regexp? >> >> #delete and #count are restricted to character lists, a full regular >> expression is too much. > > +1 for adding these to a future Ruby. We have those now. They are called gsub() and scan(). ;) James Edward Gray II