Simple Search & Replace in HTML Doc

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
visible
Posts: 6
Joined: Mon Feb 13, 2012 10:07 pm

Simple Search & Replace in HTML Doc

Post by visible »

Purchased WildEdit a long time ago - haven't used it in a while - upgraded to latest version yesterday.

Anyway, for the last 5 hours I've struggled with doing a simple search and replace - without success. I've tried every possible combination and option - and nothing works.

Goal:
Replace 3 lines of text in 76 documents all in the same folder

old text
</body>
</html>

new text
</body>
</html>

Document: HTML

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

I've used the default encoding and others.

windows-1252
iso-8859-1

...still, 0 files modified.

WildEdit used to work perfect. Now it doesn't seem to work at all.

Maybe someone can help me.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

You haven't provided remotely enough information to diagnose this problem.

What, exactly, is the text in the input? What white space does it contain? What type of line endings does it have?
Which options have you tried?
visible
Posts: 6
Joined: Mon Feb 13, 2012 10:07 pm

Post by visible »

This the exact data to be found:

</body>
</html>
<!-- Website developed by ABC Content Management System -->


This is what I want it changed to:

<script type="text/javascript" defer="defer" src="http://server1.opentracker.net/?site=ww ... "></script>
</body>
</html>


As for options, I used many different combinations - not knowing if any of them were correct or not.

I don't recall WildEdit being this difficult to use previously.

What settings would you suggest I use?
visible
Posts: 6
Joined: Mon Feb 13, 2012 10:07 pm

Post by visible »

Frustrated over not being able to get WildEdit to work, I purchased a software named 'Alias Find and Replace.' Unfortunately, it doesn't work either.

Guess I'll have to replace code snippets the old fashioned way, by hand one at a time.

If anyone knows how to set the options in WildEdit correctly, or where I can buy a search and replace application that works, I'd be grateful.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

What white space does your text contain? What type of line endings does it have?

What search text did you use?
Which setting for Regular expression syntax did you use?
Which setting for Literal line break characters did you use?
visible
Posts: 6
Joined: Mon Feb 13, 2012 10:07 pm

Post by visible »

ben_josephs wrote:What white space does your text contain? What type of line endings does it have?

What search text did you use?

Which setting for Regular expression syntax did you use?
Which setting for Literal line break characters did you use?
This is what I pasted into the search field:

</body>
</html>
<!-- Website developed by ABC Content Management System -->

Other than spaces between characters, I do not know what other 'white space' is contained in the above, nor do I know the 'type' of line endings it contains.

I used POSIX Basic Syntax. I also used Carriage Return and linefeed for literal linebreak.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Try
Search for:
\s*</body>\s*
\s*</html>\s*
\s*<!-- Website developed by ABC Content Management System -->\s*


[X] Regular expression
To find the type of line endings in your file, open it in TextPad and look at its document properties:
View | Document Properties (<Alt-Ret>).
On the Document tab, look at the File type.
visible
Posts: 6
Joined: Mon Feb 13, 2012 10:07 pm

Post by visible »

If that is the 'solution' then I do not care to use WildEdit for a find and replace application.

I need software which is effective, simple and easy to use, without having to place arcane characters in the search field, and/or wait days for support to offer such a suggestion. Besides, I've already managed to find a suitable software (abareplace.com) which performs exactly to my needs.

Thanks just the same.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Did it work?
visible
Posts: 6
Joined: Mon Feb 13, 2012 10:07 pm

Post by visible »

ben_josephs wrote:Did it work?
If you're referring to WildEdit using the settings you suggested, I have no idea if it would work or not.

I didn't test it because 1) I wouldn't remember the settings for use next time, 2) I already bought another software (abareplace.com) that works and 3) the updates to the HTML docs I needed to make are complete now.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

You're welcome.
Post Reply