Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 21st, 2007, 07:33 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gmbalaa
Default Remove the unwanted space at end of the string

I wrote the code for get the values from the text file. In that text file, values are entered with 'ENTER' delimiter. some of the values contains spaces at the end. I get the values with the using of text reader,i wnat to remove the unnecessary spaces from that values.

bcoz that values are email address,I used the regular expression to validate the mail address;in case of that unnecssary space occured at the end of the values.. regular expression consider that values as invalid mail address.

How to resolve this one?

pls any one know about this,share with me.......

thanks in advance!
 
Old August 21st, 2007, 08:08 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Would the Trim method of the string help at all?

/- Sam Judson -/
 
Old August 21st, 2007, 11:35 PM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gmbalaa
Default

Hi Sam Judson,

Ya its working perfectly.

Thanks for your valuable reply.........





Similar Threads
Thread Thread Starter Forum Replies Last Post
remove commas and space in a string kumiko Classic ASP Basics 1 January 10th, 2008 11:42 PM
How to remove unwanted DS fields before WriteToXML majkinetor ADO.NET 4 December 8th, 2006 01:52 AM
removing unwanted space below table ngvietanh HTML Code Clinic 1 August 24th, 2006 10:28 AM
Unwanted space... again Snib HTML Code Clinic 1 August 25th, 2004 04:45 PM
Remove Space from table records mateenmohd SQL Server 2000 1 July 20th, 2003 06:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.