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

# Re: regex substitution

- Date: Tue, 5 Mar 1996 06:29:54 PST
- From:
- Cc: bolie@io.com (Bolie Williams IV), moo-cows@parc.xerox.com
- Content-Type: text/plain; charset="us-ascii"

    At 09:42 PM 3/4/96 PST, slayer@kaiwan.com wrote:
    >>Is there a verb which does substitution based on regex pattern
    >>matching?  $string_utils:substitute doesn't, but it would be nice
    >>if it did.  If not, then does someone have some pre-written code
    >>which does this.  I'd rather not write it myself if it's already
    >>been done.  :)
    >
    >doesn't the builtin function substitute() perform this function?

    I believe what you'd want to do is this:

    substitute("%NTH-PARENTHESIS",match(to-be-matched,regexp-expression))

    I suggest looking at the help in the Programmer's Manual under 'match' and
    'substitute'

    - 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------

- Prev: Re: regex substitution
- Next: Re: regex substitution
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index