I am here because I need help solving this problem. So I have this string (for example). Oh and obviously the >> are displayed as >>.
Lorem ipsum dolor sit amet >>21, consetetur sadipscin>>22g elitr.
>>11 I agree.
>>61 Lorem ipsumdur. See >>36
What I want to do now is: replace the
>>INTEGER
with the following:
<a href="javascript:void(0);" onclick="scroll(INTEGER)">>>INTEGER</a>
Try this :
Refer javascript replace method for more details.
Where “$&” , Inserts the matched substring.
So the final code would be :