Start with the Below screen shot ( Before Script Task) and you will come to know about the senario.
Note : The Script Component also works for the special characters within the Data as well . for ex "A$hish"
Hover over the below Regex. it will show > Show potential fixes > in that Select System.Text.RegularExpressions. The Below will disappear.
Use the Below Script.
public override void
Input0_ProcessInputRow(Input0Buffer Row)
{
Row.CustomerID =
RemoveSpecialCharacters(Row.CustomerID);
Row.NameStyle =
RemoveSpecialCharacters(Row.NameStyle);
Row.Title =
RemoveSpecialCharacters(Row.Title);
Row.FirstName =
RemoveSpecialCharacters(Row.FirstName);
Row.LastName =
RemoveSpecialCharacters(Row.LastName);
Row.CompanyName =
RemoveSpecialCharacters(Row.CompanyName);
Row.SalesPerson =
RemoveSpecialCharacters(Row.SalesPerson);
Row.EmailAddress =
RemoveSpecialCharacters(Row.EmailAddress);
Row.Phone =
RemoveSpecialCharacters(Row.Phone);
}
public static string
RemoveSpecialCharacters(string str)
{
return Regex.Replace(str,
"[^a-zA-Z0-9_.@-]+", "", RegexOptions.Compiled);
}