regex matching strings (Jade)

Subject: regex matching strings (Jade)
From: Robin Stephenson <robin.stephenson@xxxxxxxxxxxxxxx>
Date: 08 Jul 1998 17:17:18 +0100
Is there a regex-match function for comparing strings?  Specifically,
I'd like to do something like this:

(let ((pnm (data (select-named-elements "pnm"))))
  (cond ((regex-match
          (string->regexp "Blackwell[ \t]+Publishers") pnm)
         "blackpub")
        ((regex-match
          (string->regexp "Blackwell[ \t]+Science") pnm)
         "blacksci")
        (else (error (string-append
                      "aborting: publisher `"
                      pnm
                      "' not matched")))))

All that I can find is routines to match nodelists by regex
(regexp-search, etc.): is there anything a bit more generic extant?

-- 
 Robin Stephenson
 10 Items Or Less


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • regex matching strings (Jade)
    • Robin Stephenson - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA19776Wed, 8 Jul 1998 12:22:13 -0400 (EDT) <=