Home > Back-end >  Password displayed as * * * * *
Password displayed as * * * * *

Time:01-26

I am a novice, has just started to contact API, I want to ask how to use regular expressions to display the user to enter the password for the * * * * * * * * this type

CodePudding user response:

String a="123455689". ReplaceAll (" \ \ d ", "*");
System. The out. Println (a);

Java write

CodePudding user response:

String STR="a1b2c3d45". ReplaceAll (" [A - Za - z0-9] ", "#");

This is to replace all Numbers and letters to let them become #;

CodePudding user response:

A regular expression is matched, not used to modify a string, and the password is a field, you directly replace all * not good?

CodePudding user response:

I now learn API, the feeling is relatively simple (training organization you know), and want to go to technical post development, the great god can give some practical Suggestions
  • Related