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)) { Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.