[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use Vertico + consult to do the search for an exact word.
From: |
Tassilo Horn |
Subject: |
Re: Use Vertico + consult to do the search for an exact word. |
Date: |
Thu, 01 Jun 2023 11:47:45 +0200 |
User-agent: |
mu4e 1.11.6; emacs 30.0.50 |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>> I don't use consult myself but I guess the search string is a regular
>> expression. So when you want to search for an exact word, use \bid\b
>> to find all occurrences of the word id.
>
> I've tried this trick, but it cannot match the results like `$id$', as
> shown in the attached screenshot, from where you can see that the
> entry indexed by the circle numbered 1 doesn't appear in the
> minibuffer's matching list.
That's because $ is a word-character in the syntax-table of the mode you
are using in that buffer. You can try
\([^a-zA-Z]\|\b\)id\([^a-zA-Z]\|\b\) which should also find $id$ and
1id02.
Bye,
Tassilo