unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* re-search-forward
@ 2022-10-20  8:55 Andreas Röhler
  2022-10-20  9:56 ` re-search-forward Andreas Röhler
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Röhler @ 2022-10-20  8:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

with code in buffer as below, expect a match of punctuation chars at 
second line, but matches only third one.

Second line is preceded by a TAB, third line asdf-SPACE-TAB-...




(re-search-forward "[     ]*\s.+" nil t 1)
     --------
asdf     --------



GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.16.0) of 2022-09-01




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: re-search-forward
  2022-10-20  8:55 re-search-forward Andreas Röhler
@ 2022-10-20  9:56 ` Andreas Röhler
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Röhler @ 2022-10-20  9:56 UTC (permalink / raw)
  To: help-gnu-emacs

okay, that seems to work:

(re-search-forward "[ \t]+\\c.+")

Am 20.10.22 um 10:55 schrieb Andreas Röhler:
> Hi,
>
> with code in buffer as below, expect a match of punctuation chars at 
> second line, but matches only third one.
>
> Second line is preceded by a TAB, third line asdf-SPACE-TAB-...
>
>
>
>
> (re-search-forward "[     ]*\s.+" nil t 1)
>     --------
> asdf     --------
>
>
>
> GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
> cairo version 1.16.0) of 2022-09-01
>
>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-20  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20  8:55 re-search-forward Andreas Röhler
2022-10-20  9:56 ` re-search-forward Andreas Röhler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).