473,386 Members | 1,705 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,386 software developers and data experts.

How can you recognize a carriage return? simple question

Hello,

I am trying to parse the following bounced email to
get the email adress

"Your message

To: kl**********@cnn.com

Sent: Thu, 30 Oct 2003 11:05:05 -0500

did not reach the following recipient(s):
etc..."

I am having a hard time getting the correct domain
name because it seems there is a new line character
after "m" in .com. When I do a watch on it, it prints
out as a rectangle. I have tried everything I can
think of to have the program recognize that new line
or whatever it is but have had no luck.

Here is my code

indexStart = strToParse.IndexOf("@")

If indexStart > 0 Then

i = indexStart + 1
x = strToParse.Chars(i)

While x <> " " and x <> "" And x <> "<" And x <> ">" And x <> "null"
And x <> ":" And x <> "\f" And x <> "\n" And x <> "\r"
And x <> "vbcrlf" _
And x <> "np" And x <> "nl" And x <> "cr" And x <> "<br>"
And x <> "Char(10)" And x <> "Char(13)"

domain += x
i += 1
x = strToParse.Chars(i)
End While
End If

etc...

How can I catch that character and not include it in the domain name?

Thank you,

Burak
Jul 21 '05 #1
2 1419
I'm pretty sure you can test for myChar = ControlChars.CrLf or .Cr .

HTH,

Bill
"Burak" <gu****@xpandcorp.com> wrote in message
news:10**************************@posting.google.c om...
Hello,

I am trying to parse the following bounced email to
get the email adress

"Your message

To: kl**********@cnn.com

Sent: Thu, 30 Oct 2003 11:05:05 -0500

did not reach the following recipient(s):
etc..."

I am having a hard time getting the correct domain
name because it seems there is a new line character
after "m" in .com. When I do a watch on it, it prints
out as a rectangle. I have tried everything I can
think of to have the program recognize that new line
or whatever it is but have had no luck.

Here is my code

indexStart = strToParse.IndexOf("@")

If indexStart > 0 Then

i = indexStart + 1
x = strToParse.Chars(i)

While x <> " " and x <> "" And x <> "<" And x <> ">" And x <> "null"
And x <> ":" And x <> "\f" And x <> "\n" And x <> "\r"
And x <> "vbcrlf" _
And x <> "np" And x <> "nl" And x <> "cr" And x <> "<br>"
And x <> "Char(10)" And x <> "Char(13)"

domain += x
i += 1
x = strToParse.Chars(i)
End While
End If

etc...

How can I catch that character and not include it in the domain name?

Thank you,

Burak

Jul 21 '05 #2
ru
Hello,

I clear CRLF from strings like so:
str.Replace(Chr(10), " ")

HTH,

ru
-----Original Message-----
Hello,

I am trying to parse the following bounced email to
get the email adress

"Your message

To: kl**********@cnn.com

Sent: Thu, 30 Oct 2003 11:05:05 -0500

did not reach the following recipient(s):
etc..."

I am having a hard time getting the correct domain
name because it seems there is a new line character
after "m" in .com. When I do a watch on it, it prints
out as a rectangle. I have tried everything I can
think of to have the program recognize that new line
or whatever it is but have had no luck.

Here is my code

indexStart = strToParse.IndexOf("@")

If indexStart > 0 Then

i = indexStart + 1
x = strToParse.Chars(i)

While x <> " " and x <> "" And x <> "<" And x <> ">" And x <> "null" And x <> ":" And x <> "\f" And x <> "\n" And x <> "\r" And x <> "vbcrlf" _
And x <> "np" And x <> "nl" And x <> "cr" And x <> "<br>" And x <> "Char(10)" And x <> "Char(13)"

domain += x
i += 1
x = strToParse.Chars(i)
End While
End If

etc...

How can I catch that character and not include it in the domain name?
Thank you,

Burak
.

Jul 21 '05 #3

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

Similar topics

1
by: brianj7675 | last post by:
php 4.3.6 windows xp i need to read a file and match a regular expressions with this pattern: "\r\ntitle" preg_match($title_reg, $line, $resB); $find_reg="\r\n$resB"; if (ereg($find_reg,...
1
by: Porthos | last post by:
Hello all, Is there a facet pattern that will allow for the inclusion of a newline or carriage return to occur within a tag? From the W3C schema document and from previous posts I've read that ...
4
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to...
12
by: Nimmy | last post by:
Hi, I have a data file and I want to remove Carriage returns. Any one has any C code/program which does this? I am working on Windows XP machine.....I don't have access to UNIX machine. But I...
3
by: Howard Dean | last post by:
I have a string with several carriage returns in it. For example: "This is my test string" I wish to convert it to "This is my test string" (remove all carriage returns. Can someone tell me...
4
by: Maxxam | last post by:
Hi, I have a simple question but i can't solve it simple. How can i remove carriage returns and linfeed characters , \n\r, form a string? Thanks, Andre
2
by: Burak | last post by:
Hello, I am trying to parse the following bounced email to get the email adress "Your message To: klshad903409@cnn.com Sent: Thu, 30 Oct 2003 11:05:05 -0500
7
by: mattrapoport | last post by:
I have a page with a div on it. The div displays a user comment. When the user logs into this page, their current comment is pulled from a db and displayed in the div. The user can edit the...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.