Doh, so simple. I guess the correct form of the question would be how do
I determine if a string has just a-zA-Z0-9 in it plus punctuation...

thanks,
-js


Paul Chvostek wrote:
> On Fri, Nov 29, 2002 at 10:27:05PM -0600, Jonathan Sharp wrote:
> 
>>Is there a way to determine if a string has ascii or binary data in it?
> 
> 
> You could always see if it matches a regular expression that represents
> the ascii range you're considering.  I.e., ereg('[^a-zA-Z0-9]',$string)
> will return true if non-alphanumerics are in the string.
> 
> Remember that a string is just a string.  Whether the data contained in
> it is represented as ASCII or something else is completely a matter of
> implementation.  ALL 7-bit data can be represented as ASCII.  All 8-bit
> data can be represented as "IBM Extended ASCII" or whatever you want to
> call it.  But the string is just a string of bits.
> 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to