unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: ken <gebser@mousecar.com>
To: AngusC <anguscomber@gmail.com>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: regexp with match over multiple lines
Date: Thu, 05 May 2011 09:08:33 -0400	[thread overview]
Message-ID: <4DC2A151.2020708@mousecar.com> (raw)
In-Reply-To: <31548643.post@talk.nabble.com>

On 05/05/2011 05:05 AM AngusC wrote:
> I want to remove all instances of <![CDATA[ ... ]]> data in a file.  My
> regexp works if the start and end tag is on the same line.  But not if the
> end tag is not on this same line.  Is it possible to apply regex across
> multiple lines.
> 
> My regex is: <\!\[CDATA\[.*\]\]> and that works if all on one line.  
> 
> What can I do?  Is this where lisp required?
> 
> Angus

"<\!\[CDATA\[^>]*?>" should work.

-- 
"Truth is the most valuable thing we have, so I try to conserve it."
	--Mark Twain



  parent reply	other threads:[~2011-05-05 13:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05  9:05 regexp with match over multiple lines AngusC
2011-05-05 10:04 ` Peter Dyballa
2011-05-05 16:58   ` AngusC
2011-05-05 17:02     ` Deniz Dogan
2011-05-05 18:15       ` AngusC
2011-05-05 20:05         ` PJ Weisberg
2011-05-05 22:10         ` Peter Dyballa
2011-05-06 11:10           ` AngusC
2011-05-06 12:35             ` Peter Dyballa
2011-05-06 11:20           ` AngusC
2011-05-06 13:52             ` Peter Dyballa
2011-05-05 13:08 ` ken [this message]
2011-05-05 17:28 ` Andreas Röhler
2011-05-05 18:17   ` AngusC
2011-05-06  8:27     ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC2A151.2020708@mousecar.com \
    --to=gebser@mousecar.com \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=anguscomber@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).