K
Kristian
Hi.
Can any one tell me why this code does not return what its supposed
to:
public string From(){
return POP3Message.Token( "From: (.*)" );
}
private static string Token( string _pat ){
Match match = Regex.Match( msg, _pat, RegexOptions.IgnoreCase );
if( match.Success ){
return match.ToString();
}else{
return "";
}
}
When I call the From method I get en empty string? In the Token method
the value of msg is passed earlier on in the code. The complete code
can be found here:
http://www.detandetfirma.dk/dotnet/POP3.cs
http://www.detandetfirma.dk/dotnet/RootMain.cs
http://www.detandetfirma.dk/dotnet/POP3Message.cs
Regards
Kristian
Can any one tell me why this code does not return what its supposed
to:
public string From(){
return POP3Message.Token( "From: (.*)" );
}
private static string Token( string _pat ){
Match match = Regex.Match( msg, _pat, RegexOptions.IgnoreCase );
if( match.Success ){
return match.ToString();
}else{
return "";
}
}
When I call the From method I get en empty string? In the Token method
the value of msg is passed earlier on in the code. The complete code
can be found here:
http://www.detandetfirma.dk/dotnet/POP3.cs
http://www.detandetfirma.dk/dotnet/RootMain.cs
http://www.detandetfirma.dk/dotnet/POP3Message.cs
Regards
Kristian