[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to highlight the matching reqular expression strings
From: |
thierry . volpiatto |
Subject: |
Re: How to highlight the matching reqular expression strings |
Date: |
Tue, 17 Mar 2009 07:15:34 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.91 (gnu/linux) |
Hi,
Anand Dhanakshirur <asd@cdotb.ernet.in> writes:
> Hi Bastien,
> Thanks,
> It worked for regexp like als.bd(any character).
> It highlighted the matching strings.
> But it did not work for als*bd(mutliple characters).
> It did not highlight the matching strings.
> How to do this?
May be you misunderstand the use of * here, that do not have the same
meaning that in shell like *.el.(globbing).
,----
| `*'
| is not a construct by itself; it is a postfix operator that means
| to match the preceding regular expression repetitively as many
| times as possible. Thus, `o*' matches any number of `o's
| (including no `o's).
|
| `*' always applies to the _smallest_ possible preceding
| expression. Thus, `fo*' has a repeating `o', not a repeating
| `fo'. It matches `f', `fo', `foo', and so on.
`----
Have a look at the elisp manual about regexps.
[eval - C-x C-e] ==> (info "(elisp)Regexp Special")
> Do
> Bastien wrote:
>> Anand Dhanakshirur <asd@cdotb.ernet.in> writes:
>>
>>
>>> Kindly tell me How to do regular expression seach in emacs buffer.
>>> for ex: i want to know(highlight) the all the text which are als*.
>>>
>>
>> C-u C-s a l s *
>>
>>
>
>
>
>
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France