[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp that matches newline characters?
From: |
Xah |
Subject: |
Re: regexp that matches newline characters? |
Date: |
Fri, 9 May 2008 19:51:44 -0700 (PDT) |
User-agent: |
G2/1.0 |
Sorry i seem to have misunderstood your question.
The following also works, for what's worth.
(search-forward-regexp "<pre class=\"mma\">\\([^•]*\\)</pre>")
<pre class="mma">
something here
<p>some</p>
and there
</pre>
Xah
xah@xahlee.org
∑ http://xahlee.org/
☄
On May 9, 3:18 pm, "Dmitri Minaev" <min...@gmail.com> wrote:
> On Sat, May 10, 2008 at 1:07 AM, Xah <xah...@gmail.com> wrote:
> > Line ending char can be matched by \n, but you'll need to double the
> > backslash.
>
> > However, this is prob what you want:
>
> > (some-regex-func "<author>\([^<]+\)</author>" ...)
>
> Thanks, but it won't do the job -- there are embedded tags inside
> <author>. That's why I preferred ± to < :)
>
> The regexp should eat anything, like dot, but including all kinds of
> whitespaces. Is it possible to do it with character classes? Something
> like [[:alnum:][:space:]]* (this one didn't work for me) ?
>
>
>
> > See here for some explanation and frequently used patterns:
> > http://xahlee.org/emacs/emacs_regex.html
>
> Very good page, but too short :) Thanks!
>
> --
> With best regards,
> Dmitri Minaev
>
> Russian history blog:http://minaev.blogspot.com