Answers for "check if string is alphanumeric regex"

0

check if a string is alphanumeric

if (string.match(/^[0-9A-Za-z]+$/) === null) { 
 //is not alphanumeric
 }else{
 //it is alphanumeric
 }
Posted by: Guest on June-11-2021
0

alphanumeric regex validation

validPattern = "^[a-zA-Z0-9]{10}$"; // alphanumeric exact 10 letters
this.projectForm = this.fb.group({
 ...
 CIG: [null, [Validators.required, Validators.pattern(this.validPattern)],
Posted by: Guest on August-04-2021

Code answers related to "check if string is alphanumeric regex"

Browse Popular Code Answers by Language