Thank you Bobby, thats a gret help.

Rob

> <cfset str = "ABC 123 *&$%^" />
>
> <cfoutput>
>       Has Spaces: #find(" ", str)#<br />
>       Has Numbers: #refind("[0-9]", str)#<br />
>       Has Special Chars: #refind("[^\w]", str)#
>
>       <br>
>       <br>
>
>       Clean it up in one shot: #rereplace(str, "[^\w]", "", "all")#
> </cfoutput>
>
> ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 17, 2007 12:05 PM
> To: CF-Talk
> Subject: Re: Validating Data
>
> Sorry, I should probably have mentioned that I'm after CFML server-side
> validation and not a client side solution.
>
> Thanks,
>
> Rob
>
>> Hello Guys,
>>
>> I feel like a bit of a putts for asking this, but its the first time
>> I've done any validation code for a while and I'm feeling a little
>> rusty. I have a string which I need to ensure contains no spaces, only
>> letters with NO special chars or numbers.
>>
>> I was hoping to put each of those 4 elements into 4 different
>> functions which will make them more reusable. Can anyone tell me the
>> simple code for validating each of those attributes?
>>
>> Thanks,
>>
>> Rob
>>
>>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281420
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to