jEdit Community - Resources for users of the jEdit Text Editor
Search Replace Multiple Lines With Option To Ignore Whitespace
Submitted by Anonymous on Wednesday, 10 November, 2004 - 06:23
For people who get stuck doing search/replace in HTML oftentimes, what you are searching for is multiple lines of text. Also, you tend to want to replace with multiple lines of text. Here is an example:

Search:
<table width="100%">
<tr><td>
Hello World
</tr></td>
</table>

Replace:
<table width="100%" class="somestyle">
<tr><td class="hello">
Hello
</tr></td>
<tr><td class="world">
World
</tr></td>
</table>

In other words, instead of using a text field, an option to use a text area for multiple lines would be great.

Furthermore, an option to ignore whitespace differences in the the search string would be great!. For example these would both match when I searched for Hello World!:

Search Matches:
Hello Wo
rld

Search Matches:
Hello World

You could of course use a regular expression for this. However, when search/replacing large amounts of multi-line text with HTML and other weird characters, escaping all the special characters for a regular expression usage would really suck and take a long time. A simple "ignore whitespace difference" checkbox would be much nicer.

My two cents!

Mike
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
This will be available in 4.3
by Anonymous on Wed, 10/11/2004 - 13:10
This will be available in 4.3pre1 (it's already in CVS).

-Ollie
User login
Browse archives
« December 2017  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   50872
Context Free Art (*.cfdg)   0.31   41060
JBuilder scheme   .001   16943
ColdFusion scheme   1.0   16527
BBEdit scheme   1.0   16521
R Edit Mode - extensive version   0.1   14766
Advanced HTML edit mode   1.0   13996
Matlab Edit Mode   1.0   13926
jEdit XP icons   1.0   13368
XP icons for jEdit   1.1   12396