[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiline regex mode?
From: |
Stefan Monnier |
Subject: |
Re: multiline regex mode? |
Date: |
Thu, 23 Nov 2006 14:25:36 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> Is it possible to have .* match over a new line?
> I'd like to be able to match
> {foo}
> and
> {
> foo
> }
> with a regex of the form {.*} without having to specify the line
> break.
For this particular request, yes you can: "{[^}]*}".
The "." char in a regexp is just a shorthand for "[^\n]".
If you want the {..} to be balanced, then regexps are not the answer.
Stefan
- Re: multiline regex mode?,
Stefan Monnier <=
- Re: multiline regex mode?, Dieter Wilhelm, 2006/11/24
- Re: multiline regex mode?, Peter Dyballa, 2006/11/24
- Re: multiline regex mode?, Dieter Wilhelm, 2006/11/25
- Re: multiline regex mode?, Peter Dyballa, 2006/11/25
- Re: multiline regex mode?, Perry Smith, 2006/11/25
- Re: multiline regex mode?, Dieter Wilhelm, 2006/11/25
- Message not available
- [OT] Re: multiline regex mode?, Harald Hanche-Olsen, 2006/11/25