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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiline regex mode?


From: Dieter Wilhelm
Subject: Re: multiline regex mode?
Date: Fri, 24 Nov 2006 22:14:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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.

Just for completeness: where to look for the answer? In AWK, Perl, an
Elisp function on the Emacs wiki?

Thanks
-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany




reply via email to

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