regex variable pattern

Started by Grundle, June 09, 2005, 09:46:05 AM

Previous topic - Next topic

Grundle

I was wondering if it is possible to use a variable for a pattern in a regex.  My code looks something like the following.



(set 'var1 (pop some-stack))

(if (find var1 var2 0)
     ;continue execution here
)


Obviously this doesn't work, but hopeful explains what I am trying to do.

Lutz

#1
Yes, of  course this would work, just like you wrote it!



You can use variables anywhere in newLISP.



Lutz

Grundle

#2
Yes you are right, and in fact I was doing the following.



(if (not (find (rest tag) s-tag 0))


The problem of course is that I put a quote before s-tag 's-tag

which of course will ruin everything.  It turns out to be something of an embarrassing oversite



:D