Thread
:
regular expression
View Single Post
#
1
(
permalink
)
06-26-09, 03:13 AM
jonnekke
Code Guru
Join Date: Oct 2005
Location: holland!
Posts: 704
Thanks: 0
Thanked 0 Times in 0 Posts
regular expression
Hi there..
I got a form where want to check if a zipcode is correct..
A zipcode should look like 0000AA or 0000 AA
I made this patern:
PHP Code:
$patroon3
=
"[0-9]{4}+[A-Za-z]{2}"
;
and check ik like this:
PHP Code:
if(!
eregi
(
$patroon3
,
$postcode2
)))
But it's isn't working correct..
where did I go wrong?.
_j
jonnekke
View Public Profile
Find all posts by jonnekke