[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Use the characters "+" and "-" in regular expressions
From: |
steve-humphreys |
Subject: |
Re: [External] : Use the characters "+" and "-" in regular expressions |
Date: |
Thu, 20 May 2021 16:28:06 +0200 |
> Sent: Friday, May 21, 2021 at 2:14 AM
> From: "Jean Louis" <bugs@gnu.support>
> To: steve-humphreys@gmx.com
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> Subject: Re: [External] : Use the characters "+" and "-" in regular
> expressions
>
> * steve-humphreys@gmx.com <steve-humphreys@gmx.com> [2021-05-20 16:56]:
>
> > > [:blank:] is series of characters for that:
> > >
> > > (string-match "[[:blank:]]" " ") ⇒ 0
> >
> > Have done the following (string-match "^[:blank:]$" " ")
> >
> > Because (string-match "[:blank:]" s) was matching sentences with
> > space between words as well.
>
> Are you sure? As in that case the meaning of ^ is that it matches
> begin of line, while in [^[:blank:]] it match anything but non-blank
> and meaning of ^ is "not match" in that case.
I have settled with
(string-match "^[:blank:]*$" s)
This would match only strings with spaces, not sentences with spaces. What do
you think?
>
> --
> 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: [External] : Use the characters "+" and "-" in regular expressions, (continued)
- Re: [External] : Use the characters "+" and "-" in regular expressions, tomas, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, Christopher Dimech, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, Christopher Dimech, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, Jean Louis, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, tomas, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, Jean Louis, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, Jean Louis, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, Jean Louis, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions,
steve-humphreys <=
- Re: [External] : Use the characters "+" and "-" in regular expressions, Yuri Khan, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, Eduardo Ochs, 2021/05/20
- RE: [External] : Use the characters "+" and "-" in regular expressions, Drew Adams, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, Jean Louis, 2021/05/21
- Re: [External] : Use the characters "+" and "-" in regular expressions, Jean Louis, 2021/05/20
- Dash in regexp character classes: Beginnig vs. end [was: Use the characters "+" and "-" in regular expressions], address@hidden, 2021/05/20
- Re: Dash in regexp character classes: Beginnig vs. end [was: Use the characters "+" and "-" in regular expressions], Robert Pluim, 2021/05/20
- RE: [External] : Re: Use the characters "+" and "-" in regular expressions, Drew Adams, 2021/05/19
- RE: [External] : Re: Use the characters "+" and "-" in regular expressions, Drew Adams, 2021/05/19