lundi 9 mars 2020

Need a generator with Java (if possible with a regex)

I need create a generetor with this prefix "sold:" after that i need put 2 words, 1 digit and 1 word.

Example:

  • sold:ad2c
  • sold:vf6c
  • sold:hy9t

I have this but this is for genrate random values.

function makeid() {
  var text = "";
  var possible = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";   //enter the variables*

  for (var i = 0; i < 14; i++)   //change the value depending of the length
    text += possible.charAt(Math.floor(Math.random() * possible.length));

  return text;
}

THANK YOU




Aucun commentaire:

Enregistrer un commentaire