Re: Q)Using regular expression

From: Henrik Rindlvw <rindlow_at_lysator.liu.se>
Date: Sat, 1 Jun 1996 09:53:04 +0200 (MET DST)

>>>>> On Sat, 1 Jun 1996 10:51:21 +1000, Jong-won Choi (4052) <jwchoi_at_gsen.goldstar.co.kr> said:

    Jong-won> Hi all, I'm trying to use STk's regular expression
    Jong-won> functions. The problem is *. I'd like to search a
    Jong-won> string which has * like "* wars, * trek". So I did:
    Jong-won> (define *my-rexp* (string->regexp "\* wars, \* trek"))
    Jong-won> But it did not work. How can I make regular expression
    Jong-won> from string which has special characters?

    Jong-won> Regards,

    Jong-won> Jong-won (jwchoi_at_gsen.goldstar.co.kr)

You must escape the * once more. "\\* wars, \\* trek" will do it.

//Henrik

-- 
Henrik Rindlvw, Lysator <rindlow_at_lysator.liu.se> +46-(0)13-179858          
Received on Sat Jun 01 1996 - 09:54:37 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST