[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Use the characters "+" and "-" in regular expressions
From: |
Jean Louis |
Subject: |
Re: [External] : Use the characters "+" and "-" in regular expressions |
Date: |
Thu, 20 May 2021 16:03:05 +0300 |
User-agent: |
Mutt/2.0.6 (2021-03-06) |
* steve-humphreys@gmx.com <steve-humphreys@gmx.com> [2021-05-20 14:41]:
> > (string-match "[\s]+ " s)
> >
> > Matches any white-space character.
>
> That would actually match a sentence, which I don't want.
>
> What I like to match is a string composed only of whitespace.
Did we not discuss it recently?
This is how you can make negative match:
(not (string-match "[^[:blank:]]" " ")) ⇒ t
But if there is anything inside that is not blank character, it will
not match:
(not (string-match "[^[:blank:]]" " j")) ⇒ nil
--
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, steve-humphreys, 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, steve-humphreys, 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, steve-humphreys, 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, 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 <=
- 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, 2021/05/20
- 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