Hi,
I am a n00b when it comes to regexes, and I need a way to do the following: I have a simple forum and I need a regex to check to see if a particular field contains only whitespace. Can anyone help me out with this? Thanks.
[SOLVED] regex newbie needs help
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
preg_match('#^\s+$#s',$text);
Last edited by feyd on Fri Aug 27, 2004 2:38 pm, edited 1 time in total.