locked
convert letters RRS feed

  • Question

  • User66371569 posted

    i have  column called mail

    I want to show first 3 letters and hide rest of mail   in my webform

    forexample               

    AsaadAli@hotmail.com

    I want show it    

    AsaXXXXX@hotmail.com

    Please help

    Saturday, November 10, 2018 6:36 AM

All replies

  • User-821857111 posted

    It's probably not a good idea to simply replace a portion of the email address with the same number of xxx, because that will make it easier for people to guess the missing part. So I recommend replacing everything after the first three characters with a fixed number of x:

    Dim input = "AsaadAli@hotmail.com"
    Dim parts = input.Split("@")
    Dim output = New String(parts(0).Take(3).ToArray()) & "xxxx@" & parts(1)

    Saturday, November 10, 2018 9:45 AM