For instance I want to match string only if it has characters "1" and "2" in the same quantity in it.
Input 1: 1932213 (match, since there are same quantity of "1" and "2")
Input 2: 11932213 (don't match, since there are more "1" than "2")
How do I get such a regexp ?
illustration of this could be:
( ?=(.*1){n} ) ( ?=(.*2){n} )
The question is
how to put n
in regex ?
Thank you!