[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp on emacs how to...
From: |
Nicolas Richard |
Subject: |
Re: regexp on emacs how to... |
Date: |
Mon, 01 Sep 2014 11:56:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) |
renato.pontefice@gmail.com writes:
> I would have a regexp that show me any occurence of this tag, where i.e.:
> - there are open tag [-
> - name of variable [-VARIABLENAME
> but the close tag -] are after a line break
Do you really need to do it with a regexp ? Here's some lisp to search
for all these problematic tags.
(while (and (not (eobp)) (search-forward "[-" nil t))
(unless (search-forward "-]" (point-at-eol) 'move)
(message "Problem found, please fix and hit C-M-c to continue")
(recursive-edit)))
If you really want a regexp, you could use
(re-search-forward "\\[-\\([^-]\\|-[^]]\\)*\n")
(i.e. match a "[-" not followed by "-]" on the same line)
At the C-M-% prompt, you can enter the regexp as \[-\([^-]\|-[^]]\)* followed
by a
litteral newline, i.e. C-q C-j.
HTH,
--
Nicolas Richard
- Re: regexp on emacs how to...,
Nicolas Richard <=
- Message not available
Message not available
- Message not available
- Message not available
- Message not available
- Re: regexp on emacs how to..., renato . pontefice, 2014/09/03
- Re: regexp on emacs how to..., renato . pontefice, 2014/09/03
- Re: regexp on emacs how to..., Nicolas Richard, 2014/09/03
- Message not available
- Re: regexp on emacs how to..., Renato Pontefice, 2014/09/04
- Re: regexp on emacs how to..., Nicolas Richard, 2014/09/05
- Message not available
- Re: regexp on emacs how to..., Renato Pontefice, 2014/09/10
- Re: regexp on emacs how to..., Nicolas Richard, 2014/09/10
- Message not available
- Re: regexp on emacs how to..., Renato Pontefice, 2014/09/10