[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add regexp-split

From: Nala Ginrut
Subject: Re: [PATCH] add regexp-split
Date: Thu, 29 Dec 2011 18:20:49 +0800

Hmm... think I've deleted all the things for debug.

On Thu, Dec 29, 2011 at 5:46 PM, Nala Ginrut <address@hidden> wrote:
Sorry, there's a typo.
Here it is.

On Thu, Dec 29, 2011 at 5:32 PM, Nala Ginrut <address@hidden> wrote:
hi guilers!
It seems like there's no "regexp-split" procedure in Guile.
What we have is "string-split" which accepted Char only.
So I wrote one for myself.

------python code-----
>>> import re
>>> re.split("([^0-9])", "123+456*/")
[’123’, ’+’, ’456’, ’*’, ’’, ’/’, ’’]
--------code end-------

The Guile version:

----------guile code-------
(regexp-split "([^0-9])"  "123+456*/")
==>("123" "+" "456" "*" "" "/" "")
----------code end--------

Anyone interested in it?

Attachment: 0001-ADD-regexp-split.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]