I need to replace one pattern like that : "{12345,abcd}" in html of body but i woludn't lose the events of children. I have tried that code :
$("body").html($("body").html().replace(/[{]{1}([\d]+)[,]{1}(.*?)[}]{1}/g, "<span>Code:$1</span> - <span>Text:$2</span>"))
but that kill all events of elements. How i can do?