I am trying to apply a word boundary so that only a complete word is found and changed. In example below the word "walk" is to be changed but not "walking".
Also is there a need for something else if for instance the final word 'walk' which was being changed had a period such as.... walk. or other character ending such as...... walk! so that the word walk would still be changed.
I am using the input fields as shown so as to show what is happening.
<input id="str" size=52 value="I went walking along the walk">
<input id="findthis" value="walk">
<input id="replacewith" value="road">
<input id="result" size=52 value="">
// I do not know how to apply the word boundary shown below
//whatshouldthisbe = new Regexp("\\b" + whatshouldthisbe + "\\b", "gi" );
s=s.replace(ft , rw);