[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 15:46:50 +0300 |
User-agent: |
Mutt/2.0.6 (2021-03-06) |
* steve-humphreys@gmx.com <steve-humphreys@gmx.com> [2021-05-20 13:41]:
> Am seeing how to match strings of blank lines
>
> But " +" does not do the job. I know why, but how can one match strings of
> blanks?
[:blank:] is series of characters for that:
(string-match "[[:blank:]]" " ") ⇒ 0
Match new lines as blanks:
(string-match "[[:blank:]]" "
") ⇒ 0
There can be many various spaces, like EM SPACE: " "
Thus this will not work on EM SPACE:
(string-match " +" " ") ⇒ nil
But this will work:
(string-match "[[:blank:]]" " ") ⇒ 0
--
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)
- [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 <=
- 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
- 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