<html> <!-- ARCHIVE by FORTUNECITY.ws --> <head> <title>regular expresion</title> <script> <!-- function cleanseDisplay(form){ var txt = form.inText.value; var pattern=/shit|damm|ass|stupid|bad/ig; if (txt.search(pattern) == -1) { text="No bad words. Good!"; } else { text = txt.match(pattern); } document.cleanseForm.outText.value = text; var newstring=txt.replace(pattern,"XXX"); document.cleanseForm.inText.value=newstring; } // --> </script> </head> <body bgcolor=blue><script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-47423994-1', 'fortunecity.ws'); ga('send', 'pageview'); </script> <center> <br> <div> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=728&height=90"></script> </div> </center> <center> <br> <div style="height:5px"></div> </center> <form name="cleanseForm"> <table align=center cellspacing=20> <caption><font size=5 color="red"> Cleanse Curse Words in <font color=yellow>A</font> and Redisplay them in <font color=yellow>B</font></font></caption> <tr> <th> <font color=yellow>A</font><br> <textarea name="inText" cols=30 rows=5> Enter curse words here</textarea> </th> <th> <font color=yellow>B</font><br> <textarea name="outText" cols=30 rows=5></textarea> </th> </tr> <tr> <th> <input type="submit" value="Check for curce words" onClick="cleanseDisplay(this.form)"> </th> <th> <input type="reset"> </th> </tr> </table> </form> </body> <!-- ARCHIVE by FORTUNECITY.ws --> <center> <div> <br> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=300&height=250&cache=0"></script> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=300&height=250"></script> </div> <br> <br> </center> </html>