Well, one problem is neither of your regex will match your string; the first will match strings which include 0-9 seven times in succession; the second will match seven consecutive copies of 0-9 or 0- or any combination of these; neither will match 7 random digits.I'm not sure why you are saying that, but the OP's first pattern WILL match 7 random digits. The second will also match 7 random digits, but it will also match 1-6 random digits as well.
Unfortunately, the OP is a bit unclear as to whether this sequence of 7 numbers should be isolated or part of a larger string.
In reply to Re^2: Regular expression
by dsb
in thread Regular expression
by ashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |