evil
uses the Emacs regexp facilities under the hood. Unfortunately, Emacs does not appear to have a separate syntax
class for digits, and does not recognize the \d
regexp class.
So, to match your variable named LX
where X
is a digit, it
looks like you're stuck with the clunky /L[0-9]
or the even clunkier /L[[:digit:]]
.
Note that, in principle, it looks like you could use character
codes
as listed by describe-categories
:
`\cc`
matches any character whose category is *c*. Here *c* is a
character that represents a category: thus, 'c' for Chinese
characters or 'g' for Greek characters in the standard
category table. You can see the list of all the currently
defined categories with `M-x describe-categories RET`. You can
also define your own categories in addition to the standard
ones using the `define-category` function (see Categories).
According to describe-categories
, digits are category 6.
Hence, /L\c6
should work (although it doesn't for me, even
though other categories do). Still, you wouldn't be saving
yourself much awkward typing when compared to /L[0-9]
.
isearch
or something likehelm-swoop
orswiper
? The last two should be able to do what you want easily. If you want to use the normalisearch
function but want to use a different regexp engine look at github.com/benma/visual-regexp-steroids.el