Re: count characters without space

From: Date: Sat, 11 Jan 2003 14:11:19 +0000
Subject: Re: count characters without space
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-131256@lists.php.net to get a copy of this message
> who knowes how to count the charcaters in a string without the space > character? Using a regular expression to strip out all the spaces before passing to the word counting function seems easiest. You'll be left to adapt it to PHP, but the regexp is: 's/ //g' That removes all spaces. If it gives an error, try s/\ //g to escape the space. Pass the result to whatever you use to count the number of characters. -Jeff SIG: HUP

« previous php.general (#131256) next »