|
From: | Peter Dyballa |
Subject: | Re: how can I make regexp expression effective across many lines |
Date: | Mon, 29 Jan 2007 23:11:41 +0100 |
Am 29.01.2007 um 22:01 schrieb Michael Chen:
Hi, there, I have problem with newlines in regexp. Here is what I want to do: delete anything between <FORM> to TIP OF THE WEEK inclusively. There are many lines in between. Any regex I tried can not go through the newline. Any idea?
Make it look for something that's not between beginning and end. For example
<FORM>[^·]*TIP OF THE WEEKThis greedy expression would find (and delete) everything between the first <FORM> it finds and the last TIP OF THE WEEK in the buffer. So you better use the improved form:
<FORM>[^·]*?TIP OF THE WEEK -- Greetings Pete Upgraded: Didn't work the first time.
[Prev in Thread] | Current Thread | [Next in Thread] |