JSFiddle - React, Tailwind, and code Playground
JavaScript
var testes = [
'111',
'123',
'222',
'334'];
var regex = /^(\d)\1+$/;
var resultado = testes.map(function (str) {
return regex.test(str);
});
alert(resultado);
var testes = [
'111',
'123',
'222',
'334'];
var regex = /^(\d)\1+$/;
var resultado = testes.map(function (str) {
return regex.test(str);
});
alert(resultado);