AdRock Posted March 10, 2008 Share Posted March 10, 2008 I have made my own regular expression for a UK telephone number but want to know how i can add a space between the area code and phone number. if(!ereg("^0[1-9]{4}\s?[0-9]{3,7}$",$telephone)) { Link to comment https://forums.phpfreaks.com/topic/95303-uk-telephone-regex/ Share on other sites More sharing options...
effigy Posted March 10, 2008 Share Posted March 10, 2008 EREG does not support \s. I recommend switching to PREG. Link to comment https://forums.phpfreaks.com/topic/95303-uk-telephone-regex/#findComment-488545 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.