help-gnu-emacs
[Top][All Lists]
Advanced

[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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]