I generally exlpode$ the strings - would that do?
> Is there easy way to do following tasks in CLIPS?
>
> * Matching end of String (like python string.endswith())
>
> * Matching several sub strings inside a string in correct sequence
> * For example I need to match 'LABEL' and '.TXT' in
> 3445LABEL4364.TXT
You might be interested in an experiment I did about a year ago.
Inspired by the first chapter in the book Beatiful Code (which talks
about an implementation of a regexp engine in C), I decided to try and
write one in CLIPS. You can read about it here[1].
It is, however, an experiment. It works, but I don't think it will
scale very well if you give it lots of work to do.
> Or what is the best way to integrate regular expressions in CLIPS so
> that it
> does not cause performance impact?
> I am using PYClips and have been thinking of making Python call that
> would
> do regex for me.
If you are worried about performance I think the best way is to call
out to Python. If you make sure to use compiled regexps it should be
sufficiently fast.
BR
Johan Lindberg
jo...@pulp.se
[1] http://commentsarelies.blogspot.com/2007/11/added-some-functionality-in-clips.html
and http://commentsarelies.blogspot.com/2007/10/small-regular-expression-library-for.html