Module regular-expressions

Parsing a regexp is not cheap, so we cache the parsed regexps and only parse a string if we haven’t seen it before.  Because in practice almost all regexp strings are string literals, we’re free to choose == or = depending on whatever is fastest.  However, because a string is parsed differently depending on whether the search is case sensitive or not, we also have to keep track of that information as well.  (The case dependent parse boils down to the parse creating a <character-set>, which must be either case sensitive or case insensitive).

Note: Currently, only regexp-position uses this cache, because the other functions are still using make-regexp-positioner internally.  With caching, that <make-regexp-whatever> stuff should probably go.

Exported from

Library regular-expressions

Summary
Parsing a regexp is not cheap, so we cache the parsed regexps and only parse a string if we haven’t seen it before.

regular-expressions names

Compares two objects for identity.
Compares two objects for equality.
A class.
Find the position of a regular expression inside a string.
Creates a function that finds the index of a regexp in a string.
The Regular-expressions library exports the Regular-expressions module, which contains various functions that deal with regular expressions (abbreviated to “regexps”).
Signaled when a function receives an illegal regular expression.
Does the opposite of split.
Creates a function that replaces information in a string.
Creates a function that splits a string.
Creates a function that translates a string.
A function.
Replace information in a string.
There are two unrelated functions named split.
Does a character by character translation.