isearch-symbol-regexp

isearch-symbol-regexp is a compiled Lisp function in `isearch.el'.

(isearch-symbol-regexp STRING &optional LAX)

Return a regexp which matches STRING as a symbol.
Creates a regexp where STRING is surrounded by symbol delimiters \_< and \_>.
If there are more than one symbol, then compute a regexp that matches
those exact symbols separated by non-symbol characters. If the string
begins or ends in whitespace, the beginning or the end of the string
matches arbitrary non-symbol whitespace. Otherwise if LAX is non-nil,
the beginning or the end of the string need not match a symbol boundary.