Posted by Toby A Inkster on 05/11/07 09:31
Rami Elomaa wrote:
> preg_match('#^ +$#', $var)
As I read the question, preg_match('#^ *$#', $var) might be better.
If tabs and other whitespace characters are to be allowed, then
preg_match('#^\s*$#', $var) even better!
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
[Back to original message]
|