By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

Carriage Return, Tab

P: n/a
In the Regular Expression, I can use \n for Line Feed, \t for a tab and \r
for carriage return. Am I able to use thos same expressions in a "Replace
method" of the string object? such as

NewDescrp = NewDescrp.Replace('\n', ' '); //replace Line feed with space
NewDescrp = NewDescrp.Replace('\t', ' '); //replace vertical tab with
space
NewDescrp = NewDescrp.Replace('\r', ' '); //replace Carriage return with a
space
The ASCII values are something like 10, 11 and 13. How would I specify the
numbers rather then these escape sequence values?

Thanks
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi, Jim

take a look at regular expression syntax to see what is possible.
In your case you can specify hex codes using \x

for example, \x22 is denoting "

HTH
Alex

"Jim Heavey" <Ji*******@nospam.com> wrote in message
news:Xn*********************************@207.46.24 8.16...
In the Regular Expression, I can use \n for Line Feed, \t for a tab and \r
for carriage return. Am I able to use thos same expressions in a "Replace
method" of the string object? such as

NewDescrp = NewDescrp.Replace('\n', ' '); //replace Line feed with space
NewDescrp = NewDescrp.Replace('\t', ' '); //replace vertical tab with
space
NewDescrp = NewDescrp.Replace('\r', ' '); //replace Carriage return with a
space
The ASCII values are something like 10, 11 and 13. How would I specify the numbers rather then these escape sequence values?

Thanks

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.