Hi. Could anyone explain me how the *,[],., and some other characters work within the ereg function?
I just stand looking at the examples, but i don't seem to be able to guess it. Could you at least point me some place where i could learn something about it?
Thanks in advance.
fLIPIS
Hallo.
Forexample the following line is used to control the validity of Email Address. The Email contains only a-z, A-Z, @, -(minus), _(underscore), .(punkt).
if(!eregi("[a-zA-Z0-9_-]+@[a-zA-Z0-9-_]+.[a-zA-Z0-9-.]+$", $email))
Solomon
Go to www.php.net where you can read the documentation online or download it on your PC!
http://www.php.net/manual/en/function.ereg.php
Introduction to regular expressions:
http://www.php.net/manual/en/ref.regex.php
or for Perl-Compatible (preg function's)
http://www.php.net/manual/en/ref.pcre.php
Thanks very much for your support. I'm trying to make a class to search within strings.
For the very easy&simple things you may also wanto to use the strstr() functions....