Eli Barzilay | 21 Jun 2012 13:56
Favicon
Gravatar

`regexp-replaces'

While scanning code for a minor incompatible in a commit, I ran into
this function which is the ffi collection of all places.  (See the
docs for what it does.)  Given that this comes up often, maybe it's
time to add this to `racket/string'?

(Or maybe `racket/private/string' next to the other regexp functions?)

--

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Laurent | 21 Jun 2012 17:16
Picon

Re: `regexp-replaces'

add1
I also use such a function from time to time, and I'd be happy to have it in the string or regexp libs.

Laurent

On Thu, Jun 21, 2012 at 1:56 PM, Eli Barzilay <eli <at> barzilay.org> wrote:
While scanning code for a minor incompatible in a commit, I ran into
this function which is the ffi collection of all places.  (See the
docs for what it does.)  Given that this comes up often, maybe it's
time to add this to `racket/string'?

(Or maybe `racket/private/string' next to the other regexp functions?)

--
         ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                   http://barzilay.org/                   Maze is Life!
_________________________
 Racket Developers list:
 http://lists.racket-lang.org/dev

_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev
Eli Barzilay | 22 Jun 2012 17:36
Favicon
Gravatar

Re: `regexp-replaces'

Yesterday, Laurent wrote:
> add1
> I also use such a function from time to time, and I'd be happy to
> have it in the string or regexp libs.

I'll assume that without other replies, there are no objections to
adding it?

Also, at least as a start, I'm thinking of a function that looks just
like the one from the ffi:

  (regexp-replaces str (list (list regexp replacement)
                             ...))

Anything else that this should do?

--

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Laurent | 22 Jun 2012 18:31
Picon

Re: `regexp-replaces'



On Fri, Jun 22, 2012 at 5:36 PM, Eli Barzilay <eli-oSK4jVRJLyZg9hUCZPvPmw@public.gmane.org> wrote:
Yesterday, Laurent wrote:
> add1
> I also use such a function from time to time, and I'd be happy to
> have it in the string or regexp libs.

I'll assume that without other replies, there are no objections to
adding it?

Also, at least as a start, I'm thinking of a function that looks just
like the one from the ffi:

 (regexp-replaces str (list (list regexp replacement)
                            ...))

Anything else that this should do?


Maybe we could consider dictionaries for the replacement lists?

Laurent

_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Gmane