<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body
bgcolor="#FFFFFF" text="#000000">
<span>Hi All,
<br>
<br>New to this list, sorry if this is a repost but I searched a couple
of
months back in the archives and can't find any mention of it.
<br>
<br>I very often use global search and "replace all" in a project. When
doing so, my replacement term doesn't go in the right place, but rather
in random places in the file, sometimes close to the head of the file.
<br>
<br>I can't pinpoint the exact place where it'll land, but it definitely
doesn't go where it should.
<br>
<br>Here is an example, sorry for the code dump!
<br>
<br>Sincerely,
<br>
<br>Alexandros
<br>
<br>For example:
<br>
<br>ORIGINAL FILE =======
<br>
<br><span style="font-family: monospace;"><!DOCTYPE html></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><html></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><head></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"> <title>Page
Title</title></span><br style="font-family: monospace;">
<span style="font-family: monospace;"></head></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><body></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"> Replace me here</span><br
style="font-family: monospace;">
<span style="font-family: monospace;"></body></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"></html></span><br>
<br>
<br>GLOBAL SEARCH AND REPLACE ======
<br>
<br>search: Replace me here
<br>Replace: I want a new body
<br>
<br>
<br>EXPECTED OUTPUT =============
<br>
<br><span style="font-family: monospace;"><!DOCTYPE html></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><html></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><head></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"> <title>Page
Title</title></span><br style="font-family: monospace;">
<span style="font-family: monospace;"></head></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><body></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"> I want a new body</span><br
style="font-family: monospace;">
<span style="font-family: monospace;"></body></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"></html></span><br>
<br>ACTUAL OUTPUT =================
<br>
<br><span style="font-family: monospace;"><!DI want a new body
html> <!-- Replacement text is here! --></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><html></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><head></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"> <title>Page
Title</title></span><br style="font-family: monospace;">
<span style="font-family: monospace;"></head></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"><body></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"> Replace me here</span><br
style="font-family: monospace;">
<span style="font-family: monospace;"></body></span><br
style="font-family: monospace;">
<span style="font-family: monospace;"></html></span><br>
</span>
</body>
</html>