re-gsub improvement

9 views
Skip to first unread message

Juergen Gmeiner

unread,
Dec 6, 2008, 1:29:03 PM12/6/08
to Clojure
Hi List,

a little thing I have grown quite fond of:

(re-gsub #"\b(?:word|expr|whatever)\b"
{"word" "A WORD"
"expr" "An Expression"
"whatever" "WHATEVER!"}
"welcome to the united states of whatever")

Patch at http://groups.google.at/group/clojure/web/re-gsub.patch

For completeness, I also implemented re-sub with a function as
replacement. Never needed it though.

Cheers,
Juergen

Chouser

unread,
Dec 13, 2008, 12:04:57 AM12/13/08
to Clojure
On Dec 6, 1:29 pm, Juergen Gmeiner <spamless.juer...@gmail.com> wrote:
> Hi List,
>
> a little thing I have grown quite fond of:
>
> (re-gsub#"\b(?:word|expr|whatever)\b"
>          {"word" "A WORD"
>           "expr" "An Expression"
>           "whatever" "WHATEVER!"}
>         "welcome to the united states of whatever")
>
> Patch athttp://groups.google.at/group/clojure/web/re-gsub.patch
>
> For completeness, I also implemented re-sub with a function as
> replacement. Never needed it though.

This is good! Please send in your Contributor Agreement so this patch
can be checked in.

http://clojure.org/contributing

--Chouser

Juergen Gmeiner

unread,
Jan 3, 2009, 8:49:46 PM1/3/09
to Clojure
On Dec 13 2008, 6:04 am, Chouser <chou...@gmail.com> wrote:

> Please send in your Contributor Agreement so this patch
> can be checked in.

Oops, almost missed this, sorry.

I did send the CA and I am even listed as registered contributor now.
No idea when that happened though, I am a bit distracted by RL at the
moment :)

Cheers,
Juergen

Chouser

unread,
Jan 3, 2009, 10:44:53 PM1/3/09
to clo...@googlegroups.com

Patch applied, thanks.

Stuart Sierra -- any comments?

--Chouser

Reply all
Reply to author
Forward
0 new messages