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

106
Views
regex to match if string has ev or pp using javascript

I need regex to match a condition like below:

if ev or pp is in the begining of string and has any number after that,then it should match

For example:

if string is ev100 then it will satisify the condition so it should print ev100.

if string is pp44 then print pp44.

if string is ep39 then it will not satisfy the condition. Hence it should not be printed

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You may use match here with the regex pattern ^(?:ev|pp)\d+:

var inputs = ["ev100", "pp44", "ep39"];
inputs.forEach(x => x.match(/^(?:ev|pp)\d+/) ? console.log(x) : "");

about 4 years ago · Juan Pablo Isaza Report
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!