I want to me able to replace all {{text}}
occurrences by OOOOO
.
This code works except the replacement.
Could you please help me with that ?
Thanks.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{Titre}} de la pub</title>
</head>
<body>
Contenu et {{compagnie}}
</body>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
var a = $("html").html().match(new RegExp("\{\{[^{}]+\}\}", "g"));
for (i = 0; i < a.length; ++i) {
$("html").html().replace(a[i], 'OOOOO');
}
</script>
</html>