c# - Replace entire text with XXX using RegEx -
How can convert entire text to XXX using C # in regx? This will change the number of x which will be equal to the length of the string.
For example xxxxx has the original text apple XX with high XXXXXX with cricket > outstanding With XXXXXXXXXXX without regex: The new string ('X', replaceWord.Length) creates a string with 'X' characters with the same string as
string mytext = "apple"; // I get regexp to get string output = "xxxxx" for the following line; // Apple will replace with 5x x because without the apple Long = 5
string S = "The original text for example is replacing the apple"; Var ChangeWord = "Apple"; Var s2 = s.Replace (replaceWord, new string ('X', replaceWord.Length));
replaceWord .
Comments
Post a Comment