@007JulienJul 10.2012 — #An essay of search for one of these characters in strings... [CODE] [COLOR="Blue"] // Multiple strings to split for tests[/COLOR] var str="hello word !@<script>@How are you ?@Well 5/5 !@2*2 = 4@..."...@..|..@Good luck !".split('@');
[COLOR="Blue"]// The test for one of the following characters: /:*?"<>| [/COLOR]for (var l=str.length,i=0;i<l;i++) alert(str[i]+(/[\/:*?"<>]/.test(str[i])?' contains':' does not contain ')+' one of the indicated (/:*?"<>|) characters !');[/CODE]All this characters (except colon, less and more) must be escaped with a backslash in the character class delimiter by the two square brakets...
@iGeekiHackiMattauthorJul 10.2012 — #okay, is there a to put it in a if statement?(so after i validate if they typed something in or not i can check to see if they have a invalid characters entered.). Thank You For The Reply.