Next: , Previous: , Up: Regular Expression Functions   [Index]


8.4.2.2 regexp-opt

Function: regexp-opt strings &optional paren

This function returns an efficient regular expression that will match any of the strings in the list STRINGS. This is useful when you need to make matching or searching as fast as possible—for example, for Font Lock mode.

STRINGS

list of strings

PAREN

The optional argument PAREN can be any of the following:

a string

The resulting regexp is preceded by PAREN and followed by ‘\)’; ‘\\(?1:

words

The resulting regexp is surrounded by ‘\<\>’.

symbols

The resulting regexp is surrounded by ‘\_<\_>’

non-nil

The resulting regexp is surrounded by ‘’.

nil

The resulting regexp is surrounded by ‘’