Skip to content

Instantly share code, notes, and snippets.

@ricardofiorani
Created June 18, 2015 18:00
Show Gist options
  • Select an option

  • Save ricardofiorani/7687e9ba1da04f2c7774 to your computer and use it in GitHub Desktop.

Select an option

Save ricardofiorani/7687e9ba1da04f2c7774 to your computer and use it in GitHub Desktop.
<script>
function main(){
var error = false;
var tela="";
var v = $("#in").val();
v = v.replace(/v/g, 'f');
v = v.replace(/s /g, '#@#');
v = v.replace(/#@#/g, 's ');
v = v.replace(/s/g, 'f');
v = v.replace(/ç/g, 'f');
v = v.replace(/b/g, 'f');
v = v.replace(/mp/g, 'mpf');
v = v.replace(/t/g, 'f');
v = v.replace(/V/g, 'F');
v = v.replace(/S/g, 'F');
v = v.replace(/B/g, 'F');
v = v.replace(/T/g, 'F');
//var s = 'some+multi+word+string'.replace(/\o/g, 'h');
//alert(s);S
tela = v;
$("#out").text(tela);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment