Adding split/split' to Data.List, and redefining words/lines with it; also, adding replace/replaceBy

Brandon S. Allbery KF8NH allbery at
Thu Jul 10 22:59:13 EDT 2008

On 2008 Jul 10, at 22:49, Jonathan Cast wrote:

> On Thu, 2008-07-10 at 19:40 -0700, Eric Torreborre wrote:
>> Hi,
>> Neil's version of split is has the same kind of behavior than Java's,
>> Ruby's, Python's
> Add perl to that list, as well.

Perl's is configurable:  if the regexp includes a capture, the  
captured part of each separator will be included in the returned  
list.  Thus split(/(,)/, @foo) will capture the commas between the  
list items.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at
system administrator [openafs,heimdal,too many hats] allbery at
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Libraries mailing list