Discussion:
[Notepad-plus-plus] [notepad-plus - Help] Using Find/Replace to DELETE specific section
SourceForge.net
2009-09-10 20:15:06 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7622959
By: bryantg

I've read through the examples on the "Regular Expressions" wiki page, but I
can't fathom what it would take to accomplish my specific need.

I'll throw up a screen capture so you can follow along much easier:
http://yfrog.com/4rcapturehlj

See the gray highlighted area? I need to repeatedly delete those sections throughout
the entire document, while being careful not to remove anything highlighted
yellow. I'm familiar with how to add different search parameters using ( ) ^
\1-9, etc., but I'm at a loss as to how I would handle this particular project.

Any geniuses on this forum?

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2009-09-10 20:35:54 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7623045
By: cchris

I see how sed, and probably awk would do that. But not Notepad++ I'm afraid,
even with a good regex engine.

CChris

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2009-09-10 20:39:27 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7623059
By: fool4uanyway

Just a quick reply.

You may find some very interesting information in the following threads:

"Does N++ Support REGEX With Multiple Lines?" (Open Discussion forum)
http://sourceforge.net/forum/forum.php?thread_id=3004512&forum_id=331753

This deals with creating single lines from multiline sections, allowing you
to easily remove those oneliners in the next pass to be left with only the lines
you do want to keep.

"Find - Cut the line + next one - Insert in ne" (Help forum)
http://sourceforge.net/forum/forum.php?thread_id=3086440&forum_id=331754

This may hint you on an other approach: keeping (or copying) only those lines
you want to (keep).

Think about what you do and do not want. What are the characteristics of both
types of lines or sections?

You might want to keep only the lines starting with text (character).
You might want to remove all the lines not starting with a character a to z
(A to Z).

Lines starting with {, $ and } seem to be the ones you want to remove...


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754

Loading...