[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determining existence of text following point
From: |
Christopher Dimech |
Subject: |
Re: Determining existence of text following point |
Date: |
Tue, 18 May 2021 14:23:25 +0200 |
> Sent: Tuesday, May 18, 2021 at 11:56 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: tomas@tuxteam.de, help-gnu-emacs@gnu.org
> Subject: Re: Determining existence of text following point
>
> * Christopher Dimech <dimech@gmx.com> [2021-05-18 14:27]:
> > > > (setq sa (string-match "[^[:blank:]]" " "))
>
> > I find the description different from what string-match actually
> > returns.
>
> The symbol ^ means "not following", and that regular expression means
> match non-blanks.
>
> (string-match "[^[:blank:]]" " ") ⇒ nil
> (string-match "[[:blank:]]" " ") ⇒ 0
You are correct. "^" means match everything but the following class.
I am quite used on see "^" to mean "beginning of line". So just read
it as I usually do.
It is unfortunate that there exist so many different syntaxes for writing
regular expressions.
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> Sign an open letter in support of Richard M. Stallman
> https://stallmansupport.org/
> https://rms-support-letter.github.io/
>
>
- Re: Determining existence of text following point, (continued)
- Re: Determining existence of text following point, michael-franzese, 2021/05/17
- Re: Determining existence of text following point, michael-franzese, 2021/05/18
- Re: Determining existence of text following point, Jean Louis, 2021/05/18
- Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, Jean Louis, 2021/05/18
- Re: Determining existence of text following point, Jean Louis, 2021/05/18
- Re: Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, tomas, 2021/05/18
- Re: Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, Jean Louis, 2021/05/18
- Re: Determining existence of text following point,
Christopher Dimech <=
- Re: Determining existence of text following point, tomas, 2021/05/18
- Re: Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, tomas, 2021/05/18
- Re: Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, tomas, 2021/05/18
- Re: Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, Jean Louis, 2021/05/18
- Re: Determining existence of text following point, Christopher Dimech, 2021/05/18
- Re: Determining existence of text following point, Jean Louis, 2021/05/18
- Re: Determining existence of text following point, michael-franzese, 2021/05/18