Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

292
Views
Coincidencia de expresiones regulares entre 6 y 24 letras, números, guiones bajos y guiones

Mi expresión regular actual es /^[A-Za-z0-9_-]\w{5,23}$/ y coincide con todo excepto con el guión. Probé \- y todavía no hay sopa. ¿Alguien con un poco más de experiencia sabe cómo atrapar el guión?

 let errmsg = document.querySelector("#error"); let input_box = document.querySelector("#password"); function checkPassword(value) { var regex = /^[A-Za-z0-9_-]\w{5,23}$/; if (!regex.test(value.target.value)) { console.log(value.target.value); errmsg.style.display = 'block'; input_box.style.borderColor = 'red'; } else { errmsg.style.display = 'none'; input_box.style.borderColor = 'black'; } } input_box.addEventListener('input', checkPassword);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!