Question regarding replace

Hi
I have a question if i will take a value from user by using input dialog so my question is i want to replace the value with each other.
suppose ex:-ababab=bababa or a333a=3aaa3

Hi @Ak_4 ,

The Replace lets you replace characters or even phrases like so:

"Item to replace".Replace("Item", "") -> " to replace"

"Item to replace".Replace("e","") -> "Itm to rplac"

If you could be a bit more specific as to the operation you wish to perform, then we would be in a better position to assist you.

Kind Regards,
Ashwin A.K

can you give the solution of example aa3a33=33a3aa

Hi,

If there are just 2 types of characters in the string, the following will work.

System.Text.RegularExpressions.Regex.Replace(yourString,".",Function(m) yourString.Distinct.Where(Function(c) c<>m.Value).First().ToString)

Regards,