Carriage Return, Tab

J

Jim Heavey

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
 
A

AlexS

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top