# regex substitution

Kipp the Kidd (mcmudge@mailbox.syr.edu)
Wed, 6 Mar 1996 22:10:14 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    At 09:06 PM 3/6/96 PST, Bolie Williams IV wrote:
    >What I want to do is take an arbitrary string and substitute one
    >string for arbitrary substrings.  For example, substitute an 's' or
    >any number of 's's with the letter 't'.  Using sed, I'd just do a
    >s/ss*/t/ or s/s+/t/ (I think).  I'm going to be substituting in arbitrary
    >text, though, so I don't have the luxury of marking my substitutions
    >with %'s.

    Oh, I see:

    ;strsub("What the fuck is STRSUB???","fuck","fudge")
    => "What the fudge is STRSUB???"

    - Kipp
    -----BEGIN GEEK CODE BLOCK-----
    GCS/CC d- s+:- a16 C++ UL++++ P+ L++ E-? W+ !N--@ !o-- K->K++++++
    w++(--) O- M-- V--? PS++(+) PE(--) Y+ PGP-? t+ 5(+) X++ R+++(*)
    !tv b+ DI++++ D++++ G e* h!()(*) r+ !y+
    ------END GEEK CODE BLOCK------
    -----BEGIN NOT SO GEEKY BLOCK-----
    MOO projects:
      RPG Minimal.db:  paradigm.microwave.com 5000
      MOO2000:         moo.microwave.com 2000
      MundoHispano:    europa.syr.edu 8888
    ------END NOT SO GEEKY BLOCK------