Input:
Search_Pattern:
Replace_Pattern:
Controls:
Flags:
RX_ON:
Loop:
The function (double-click to reload ['re-eval']):
function regplax() { var form = document.forms[0]; var input = form.Input; var output = input; var pattern = form.Search_Pattern.value; if ( !form.RX_ON.checked ) { pattern = pattern.replace(/(\W)/,'\\$1') } var Flags = form.Flags.value; var searchRg = new RegExp(pattern,Flags); var replaceSt = form.Replace_Pattern.value; var buff = input.value.replace(searchRg,replaceSt); if ( form.loop.checked ) { while( buff.search(searchRg) > -1 ) { buff = buff.replace(searchRg,replaceSt); } } output.value = buff; } window.regplax = regplax;