<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Thanks for the tips, as I guess you could tell I've only just started to dabble in JavaScript recently.

However I think I'll leave the option of using indexOf to the user.  Consider a site like Facebook where there are many link titles which contain the word &quot;friends&quot; for example.  You may wish to modify the &quot;friends&quot; link, but not the &quot;5 of your friends&quot; link.  So if you would rather match substrings, then make the change that Joe suggested.  Otherwise enter the text in exactly.  What I will do, however, is make the equality case insensitive.

P.S, What I'll do later on (too busy now) is allow you to search using substrings, and give the option of only replacing the substring instead of the entire text.</body>
  <body-html>&lt;p&gt;Thanks for the tips, as I guess you could tell I've only just started to dabble in JavaScript recently.&lt;/p&gt;

&lt;p&gt;However I think I'll leave the option of using indexOf to the user.  Consider a site like Facebook where there are many link titles which contain the word &quot;friends&quot; for example.  You may wish to modify the &quot;friends&quot; link, but not the &quot;5 of your friends&quot; link.  So if you would rather match substrings, then make the change that Joe suggested.  Otherwise enter the text in exactly.  What I will do, however, is make the equality case insensitive.&lt;/p&gt;

&lt;p&gt;P.S, What I'll do later on (too busy now) is allow you to search using substrings, and give the option of only replacing the substring instead of the entire text.&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-08-13T02:19:15Z</created-at>
  <forumable-id type="integer">27909</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">72363</id>
  <topic-id type="integer">16816</topic-id>
  <updated-at type="datetime">2008-11-17T00:18:41Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">54969</user-id>
</post>
