How can you recognize a carriage return? simple question

burak

Centurion
Joined
Jun 17, 2003
Messages
127
Hello,

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

"Your message

To: klshad903409@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 <>
"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>"

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
 
One of these checks did the trick
x <> ControlChars.CrLf
And x <> ControlChars.NewLine
And x <> ControlChars.NullChar
And x <> ControlChars.Lf
And x <> ControlChars.Cr
 
Back
Top