Hi,
I am trying to replace all characters in a string to be a * because it is stroing a password…
I know I can use string.gsub but Im struggling with the ‘pattern’
I thought I had it spot on when I did this:
t = string.gsub(t, “(%a)”, “%*”)
but it didn’t mask numbers so password1234 would become *******1234
then I tried:
t = string.gsub(t, “(%w)”, “%*”)
which I thought worked great (again) but then it didnt mask chars such as !"£$%^&
Can anybody tell me the pattern to match absolutely any character and replace it with a *?
I know i’m close but no cigar just yet
Many thanks
Dave