Convert HTML to txt
Public Static String Htmtotxt ( String Input)
{
Input = New RegEx ( @" (? M) <SCRIPT [^>] *> (\ w | \ W )*? </Script [^>] *> " , Regexoptions. multiline | Regexoptions. ignorecase). Replace (input, "" );
Input = New RegEx ( @" (? M) <style [^>] *> (\ w | \ W )*? </Style [^>] *> " , Regexoptions. multiline | Regexoptions. ignorecase). Replace (input, "" );
Input = New RegEx ( @" (? M) <select [^>] *> (\ w | \ W )*? </Select [^>] *> " , Regexoptions. multiline | Regexoptions. ignorecase). Replace (input, "" );
Input = New RegEx ( @" (? M) <A [^>] *> (\ w | \ W )*? </A [^>] *> " , Regexoptions. multiline | Regexoptions. ignorecase). Replace (input, "" );
RegEx objreg = New System. Text. regularexpressions. RegEx ( " (<[^>] +?>) | " , Regexoptions. multiline | Regexoptions. ignorecase );
Input = Objreg. Replace (input, "" );
RegEx objreg2 = New System. Text. regularexpressions. RegEx ( " (\ S) + " , Regexoptions. multiline | Regexoptions. ignorecase );
Input = Objreg2.replace (input, " " );
Return Input;
}