.NETGURU
Replace
with hex 0d 0a
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngregexp' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Rob Kaeser
How can I replace the search for "<BR>" with the hex representation of a
line feed (\0d\0a) for text files? If I pass "\x0d\x0a" in the Replace
function, it simply replaces the <BR> with a "\x0d\x0a". How can I force
it to interpret the actual hex values and write those to the string,
which I am sending to a .txt file?

Thanks,
    -ROB

Reply to this message...
 
    
Steve Sharrock (VIP)

String s = "Now is<BR>this time";

String t = s.Replace("<BR>", "\r\n" );

Be careful for upper/lower case <BR>. You might also consider a regular
expression process.

Steve Sharrock
programmer / designer
www.sharkcode.com

-----Original Message-----
From: Rob Kaeser [mailto:Click here to reveal e-mail address]
Sent: Wednesday, October 31, 2001 1:22 PM
To: aspngregexp
Subject: [aspngregexp] Replace <BR> with hex 0d 0a

How can I replace the search for "<BR>" with the hex representation of a
line feed (\0d\0a) for text files? If I pass "\x0d\x0a" in the Replace
function, it simply replaces the <BR> with a "\x0d\x0a". How can I force
it to interpret the actual hex values and write those to the string,
which I am sending to a .txt file?

Thanks,
    -ROB

| [aspngregexp] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Meor Zaharin Meor Ibrahim
try Regex.Replace

-----Original Message-----
From: Rob Kaeser [mailto:Click here to reveal e-mail address]
Sent: Thursday, November 01, 2001 5:22 AM
To: aspngregexp
Subject: [aspngregexp] Replace <BR> with hex 0d 0a

How can I replace the search for "<BR>" with the hex representation of a
line feed (\0d\0a) for text files? If I pass "\x0d\x0a" in the Replace
function, it simply replaces the <BR> with a "\x0d\x0a". How can I force
it to interpret the actual hex values and write those to the string,
which I am sending to a .txt file?

Thanks,
    -ROB

| [aspngregexp] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngregexp.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
 
System.Text.RegularExpressions.Regex




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification