Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
Reading regex from csv file is not reading commas

I am using CSV file for providing data to my tests written in webdriverIO. While reading regex commas are not read by csv file, so i am adding '&' in csv file for regex e.g : ^[0-9]{8&15}$ and then replacing '&' with ',' (comma) to make regex some like this ^[0-9]{8,15}$ but the problem is while reading this in script the {8,15} which is min and max number are not getting formed as needed. Its generating regexps something like 2{8,15}, 5{8,15} .. and so on.

I am replacing '&' with ',' using method below:

randomExpression(exp) {
       return new RandExp(exp).gen();
}
modifyRegEx(regex){
       const rgx = this.randomExpression(regex)
       return rgx.replace(/&/g, ',');
}

I tried finding ways but could not find anything, is this issue with curly braces? How to make this string recognized as regex?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda