Thursday 3 October 2019

remove special character from a string in ax d365

remove special character from a string in ax d365

Below is a very simple trick to remove the special character from any string .

Static str removeSpecialcharacter(str _InputString)
{
   str message;
   message =  System.Text.RegularExpressions.Regex::Replace(_InputString, @"[\W_]", "");
   return message;
}
You can also use below
strRem(words,"\"" + "\t" + "\r" + "\n" + "\r\n" + "\\" +"\b" + "\f");

Thanks,
Vikas Mehta


Thanks,
Vikas Mehta.

No comments:

Post a Comment

AZURE INTERVIEW QUESTIONS AND ANSWERS

AZURE INTERVIEW QUESTIONS AND ANSWERES 2021 2. What is cloud computing? Explanation:  It is the use of servers on the internet to “store...