On Jun 07, 2006, at 02:24 UTC, Craig Hoyt wrote:

> They have  
> either a CR or LF for a fifth character in its name. There are  
> others. Is there a RegEx or encoding way to strip out all hidden  
> characters in a string? Or, is there another way - other than the  
> obvious way of walking the string and examining each character. I  
> guess what I'm trying to say is there an elegant way of doing this?

If you know they'll be at the beginning or end of the name, then a simple 
Trim() should do it.  If not, then you might use s = StringUtils.Remove(s, 
StringUtils.ControlCharacters).  This is part of the free String Utilities 
module at <http://www.verex.com/opensource/>.

It could be done with RegEx too, but it'd be more work and probably less 
efficient.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to