OP 13 May, 2020 - 10:54 PM
Hey people, I have some code for amazon.com and its supposed to generate multiple codes with a certain regex. Does anyone know how i can change this code to a regex like this :
that would produce a code like this: R26X-NT5XPT-TZ6A1 but random.
Here is my javascript code. BTW, i didn't make this.
I am a COMPLETE javascript noob, so i have no idea what im doing. I'm only good at regular java. Thanks to anyone who can help!
Code:
[A-Z1-9]{4}-[A-Z1-9]{6}-[A-Z1-9]{5}
Here is my javascript code. BTW, i didn't make this.
Code:
var speed = prompt("Enter a speed")
function makeid() {
var text = "";
var possible = "6SJXEoQ0Htx4WhvKgu2b3fIrle8wBZs1MRpT9PGyDCLVUmYO5AdiankFc7qjzN"; //This is what needs to be changed
for (var i = 0; i < 14; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
function main() {
//whatever
}
setInterval(function() {
main();
}, speed);