Hi everybody, I am trying to learn regex and could need some help.
There are 2 function I would need. 1 which returns false if the data does contain anything else than numbers or fullstops I tryed this: function validate_phone ($phone) { return (ereg('^[0-9][:punct:]', $phone)); } The next one is to return fals if the data does not contain a number inside the string ("street 893" would be valid) I tryed this: function validate_street ($street) { return (ereg('^[0-9]', $street)); } Unfortunatelly this does not work like I want ;-) Thank you for any help on this, andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php