<span> iiiiiiiiiiiiiiiiiiyyyyyyyyy </span> <script> $("span").text($("span").text().replace(/y/g, "i")); </script>