> Any idea for simplifying this script ?

An alternative approach might be to split and join:
     var txt = "lorem ipsum\n@@CONTENT@@\ndolor sit amet";
     var parts = txt.split("@@CONTENT@@");
     txt = parts[0] + "hello world" + parts[1];

However, that only works if you have a unique known marker, in which 
case you might as well use the replace method.


-- F.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to