AdRock Posted September 8, 2007 Share Posted September 8, 2007 I have a registration form (updating old one) and some registered users have a space in their username How do I add the space to this regex? else if(!ereg("^[A-Za-z0-9\-]{4,30}$",$username)) Link to comment https://forums.phpfreaks.com/topic/68513-solved-how-to-add-a-space-in-a-regular-expression/ Share on other sites More sharing options...
BlueSkyIS Posted September 8, 2007 Share Posted September 8, 2007 else if(!ereg("^[A-Za-z0-9 \-]{4,30}$",$username)) Just add a space? I guess you could add \w... Link to comment https://forums.phpfreaks.com/topic/68513-solved-how-to-add-a-space-in-a-regular-expression/#findComment-344420 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.