How can I delete all except necessary worlds

General discussions about Advanced Find and Replace
Post Reply
Artem

How can I delete all except necessary worlds

Post by Artem » Mon Jan 31, 2005 5:32 pm

I want to save in the file this text <a href=".*<br>
but the rest of text i want delete, how can do it?

Abacre
Site Admin
Posts: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Jan 31, 2005 5:32 pm

It's not clear what do you mean.
Please give a source text and resulting text that you should get after transformation.

Artem

Post by Artem » Mon Jan 31, 2005 5:32 pm

Roman wrote:It's not clear what do you mean.
Please give a source text and resulting text that you should get after transformation.


source Text

abc htr
dsf <a href=".*<br>
<a href=".*<br>
dfgfh hfgh
hfghf

resulting text

<a href=".*<br>
<a href=".*<br>

P.S. Forgive me for my bad english

irbrian

Delete unnecessary Worlds??

Post by irbrian » Mon Jan 31, 2005 5:32 pm

I think it is not for us to judge which worlds are necessary. We live in this world, and while I realize not everyone would agree to its level of necessity, I personally wouldn't be very pleased if someone deleted it without any kind of warning or explanation.

;)

Abacre
Site Admin
Posts: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Jan 31, 2005 5:32 pm

Artem, it's possible to do your task. I am just searching for correct
r.e.

Primarily it should be in 3 pairs of r.e. that should be put into batch grid, something
like this:

Search for:
\A.*?(<a href="\.\*<br>)
Replace with:
$1

Search for:
(<a href="\.\*<br>).*(<a href="\.\*<br>)
Replace with:
$1\r\n$2

Search for:
(<a href="\.\*<br>).*?\Z
Replace with:
$1

But these r.e. still need a final turning especially the last one.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest