Hi, Koders
How can i replace most part of an email or phone number by asterisks folowing this example:
[email protected]
m***************@k******.com
and
(99) 99999-9999
(99) *****-9999
Since now i apreciate
Taifun
#2
there might be a regex, which is able to do this…
alternatively do it manually step by step
- split the email address by
@
to get a list
- select the first item from the list to get
myappfromkodular
, also select the 2nd item from the list to get kodular.com
- split the second part by
.
to get a list
- select the first item from the list to get kodular
prepare a procedure, which returns n asterisks
for myappfromkodular
and kodular
to the following
- get the length of the string
- keep the first character of the string and add the asterisks using the previously mentioned procedure
- put the strings back together
do it similarly for the phone number
Taifun
1 Like