|
Posted by awebguynow on 11/17/51 11:34
I ran across this code, and it kind of made me nervous: (as an email
validator)
if ( !preg_match("/.*\@.*\..*/", $_POST['email']) | preg_match("/(\)/",
$_POST['email']) )
1) from bitwise experience with "C", I was not at all comforable with
!preg_match()
The manual is not clear about using ! with a non-boolean value.
When using !($var) is ($var) converted to a boolean value, before
doing the NOT oper ?
2) I believe the 2nd use of preg_match was the one that caused a
REGEX compilation error.
Warning: preg_match() [function.preg-match]: Compilation failed:
missing ) at offset 3 in ..
can anyone help ?
Navigation:
[Reply to this message]
|