473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Check string for special characters

I'm reading an XML document and creating a CMS Posting for eacho specific
node but i'm trying to save the posting using the title as Posting.Name.
For this to work i have to remove all special caracters that the Name
propertie doesn't support.

Can anyone hellp me?

Thanks

Jul 21 '05 #1
4 1988
For this to work i have to remove all special caracters that the Name
propertie doesn't support.


And what characters are "special"?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #2
Characters like "/#$%&()=' or even á é õ
This are a few examples.
"Mattias Sjögren" wrote:
For this to work i have to remove all special caracters that the Name
propertie doesn't support.


And what characters are "special"?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Jul 21 '05 #3
Ricardo Jesus <Ri**********@discussions.microsoft.com> wrote:
Characters like "/#$%&()=' or even ? ? ?
This are a few examples.


A few examples aren't enough though - you need to have a very precise
specification of which characters are allowed and which aren't.
Otherwise you won't be able to write the code, and if you *could* write
the code, you wouldn't know whether or not it does what it should.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
I've solved this problem, thanks everyone

"Jon Skeet [C# MVP]" wrote:
Ricardo Jesus <Ri**********@discussions.microsoft.com> wrote:
Characters like "/#$%&()=' or even ? ? ?
This are a few examples.


A few examples aren't enough though - you need to have a very precise
specification of which characters are allowed and which aren't.
Otherwise you won't be able to write the code, and if you *could* write
the code, you wouldn't know whether or not it does what it should.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul | last post by:
Hi Doing my best to understand why I cant insert a vbcrlf or an equivalent into this piece of code that read messages from an SQL DB. The messages it takes read into a marquee fine but I want...
14
by: deko | last post by:
Is there a way to check user input for illegal characters? For example, a user enters something into a text box and clicks OK. At that point I'd like to run code such as this: illegal =...
4
by: Ricardo Jesus | last post by:
I'm reading an XML document and creating a CMS Posting for eacho specific node but i'm trying to save the posting using the title as Posting.Name. For this to work i have to remove all special...
14
by: Shhnwz.a | last post by:
Hi, I am in confusion regarding jargons. When it is technically correct to say.. String or Character Array.in c. just give me your perspectives in this issue. Thanx in Advance.
3
by: jeyabarani | last post by:
Hi guys, I want to check whether the user has entered any special characters in a text box. If the user enters, i want to display an alert message stating that he cant enter a special character...
9
by: somenath | last post by:
Hi All, I was going through one piece of code which is written by an experience programmer and it is working fine. But I think the use of "strstr" is not proper because it may show undefined...
4
by: smartic | last post by:
how to test string whether it contains special characters -------------------------------------------------------------------------------- please help dear experts on how to test string...
2
by: gamernaveen | last post by:
I wanted to include a string invalid character check in my application. Like the field comment , if a user inserts any special characters (Except '' , '@' , '/' , '=' and numbers - alphabets) ,...
5
by: Sobin Thomas | last post by:
Hi All, I want to pass a string that contains many special characters (: \ . _ etc) to another page in my website through query string. In my project I have a Gridview control ,in which there...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.