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

190
Views
Regular Expression: Opposite of specific length of numbers

According to the title. I'm looking for a regular expression to match the unspecified length of numbers (any length except 10).

It no't work:

(?!\d{10}$)

Best Regards.

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

0

Currently your pattern is an unanchored negative lookahead assertion that fires at every position.

What you can do is anchor it at the start of the string, and match the digits until the end of the string:

^(?!\d{10}$)\d+$

See a regex demo.

Or alternatively match either 1-9 or 11 or more digits

^(?:\d{1,9}|\d{11,})$
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!