a-Z0-9()[]^-_.
Posted: Sun Oct 04, 2009 11:55 am
Could anyone please give me the regex 'code' for allowing only
Code: Select all
a-Z 0-9 - _ ( ) [ ] { } . ^Code: Select all
if(!preg_match("A-Za-z0-9_^(){}[]-|~.", $_GET['bn'])) {
//error
}
/* index.php?bn=Hey returns:
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash
*/