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

145
Views
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
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!