javascript - Rex ex to find a number of items -


Reginald X I need your help to suppress! I have found a regular expression that will see a separate integer separated by commas

  / \ (\ d {0,2},? \ D {0,2},? \ D {0, 2},? \ D {0,2},? \) / G  

which will match four (two digit) numbers

  • (3 ) // No comma is needed if it is only one number
  • (3,2)
  • (2,3,4)
  • (99 , 99, 99)
  • (1,2,3,4)

However, it is limited to four sets of numbers. I can repeat the pattern in the reggae app to match as much, but is there a way, with many iterations of "dd {0,2}" without filling the ray pre 1 and 10 with a comma Can I see different numbers?

The need to match

  • (1,2,3,4,5,6,8,9,10)
  • (1, 2, 3,4,5,6,8,9,99)
  • (99, 99, 99, 99, 99, 99, 99, 99, 99, 99)

Is this possible?

\ (\ d {1,2} (?:, \ D {1, 2}) {0}}

Try it out. 4 2 separated by digit numbers , See the demo.

  \ (\ d {1,2} (?:, \ D {1,2}) {0}}  

You can use it up to 10 iterations.


Comments