help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: Regexp for matching control character, say, FORM FE


From: Hongyi Zhao
Subject: Re: [External] : Re: Regexp for matching control character, say, FORM FEED. (Was: Re: The `^L' appeared in built-in help.)
Date: Thu, 22 Jul 2021 16:04:30 +0800

On Thu, Jul 22, 2021 at 12:14 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Drew Adams wrote:
>
> >>>>> I want to know whether there are some similar regexp
> >>>>> patterns in Emacs as the ones used by grep, say, $'\014'
> >>>>> or $'\f'.
> >>>>
> >>>> (re-search-forward "\C-l")
> >>>
> >>> Yes, or (re-search-forward "[\f]")
> >>>      or (re-search-forward "[\014]")
> >>
> >> What about
> >>
> >>   (re-search-forward (kbd "C-l"))
> >
> > Sure.  Which is the same as (re-search-forward "\f").
>
> So far, these works
>
>   (re-search-forward "[\014]")
>   (re-search-forward "[\f]")
>   (re-search-forward "\C-l")
>   (re-search-forward "\f")
>   (re-search-forward (kbd "C-l"))
>
> It seems subexpressions at lines 1 and 2 evaluate to the same
> "[^L]", as does for their part lines 3, 4 and 5, and then it
> is "^L"...

I observed the same behavior.

HY
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



reply via email to

[Prev in Thread] Current Thread [Next in Thread]