Since this is merely a string argument to a function, one can define its syntax in any manner desired without regard to its impact on the structure of the Jess language or the need to prevent conflict with existing constructs. If one wishes to use the values of previously-bound variables, one can concatenate them with other parts of a string. We're also free to make the regex string syntax almost anything desired, so, for instance, the decision could be made to use sed syntax, so variables could even be bound and re-used _within_ the matching (whether this is needed or desirable being another issue). It would even be possible to have multiple "flavors" of the "match" function, each using different regex syntaxes.

To me, the strength of this approach is that the knowledge of such things is compartmentalized within the function's documentation, and there is no need to know about it unless you need to perform regular expression matches.

On Tuesday, November 4, 2003, at 11:34 PM, Eric Jain wrote:

(animal (name ?n&:(match ?n "[a-z]*")))

the most flexible; witness all the issues presented regarding
variables and multislots in regular expressions.

So how would this solution address variables in regular expressions?



-------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------



Reply via email to