I'm trying to construct a regular expression that would match symbols, that is, things like function names and the like, according to current major mode settings (it's called syntax table if I remember correctly). After some investigation, I have found these useful regexps:
\_<matches beginning of a symbol
\_>matches end of a symbol
Now I think I need to find out how to represent symbol-constituent
character. We have
\w for word-constituent characters, but I cannot find
anything for symbols. Regexp to match symbols should be something like
\s matches on symbol-constituent characters):
Am I missing something? How to match on symbols?
Note that matching on words does not work for me. Trivial example is
foo-bar that is a symbol in Emacs Lisp mode, but not a word
- is not a word-constituent character).