Parsed regular expressions

For the Compleat Fan
Locked
Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Parsed regular expressions

Post 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
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked