Page 1 of 1

Parsed regular expressions

Posted: Sun Mar 02, 2008 1:43 am
by Jeff
Lutz,

Does the interpreter do any caching of parsed regular expressions (to avoid having to reparse each string)? If not, could you give us access to a function that would let us store a compiled regex for repeated use? You could even hide the implementation in a built-in foop context :).

Jeff

Posted: Sun Mar 02, 2008 2:14 am
by Lutz
Yes, since version 7.2 (Oct 2003) newLISP does cache the last compiled regex pattern, so on repeated use the same pattern gets parsed and compiled only once.

Lutz