From: Warren Brown Date: 2003-07-23T01:45:21+09:00 Subject: Re: Should String#strip take a parameter? All, > We need to define the behavior first. Python 2.3's > strip takes a parameter, but it strips off all > characters in the string, i.e. > > a = "<><<>>>>><><>" > a.strip("<>") # => "abc" > > matz. OK, how about the methods taking a Regular Expression as a parameter (converting strings as necessary), with nil defaulting to /[\s\t\r\n\f]/? That would still allow "___xxx___".strip("_"), but could also allow "<><<>>>>><><>".strip(/[<>]/). - Warren Brown