I'm looking for help with a regex.
My input field should allow only groups of up to 7 digits, and an unlimited number spaces whether at the beginning, middle, or end.
Here are a few examples of valid matches
Match1:
478 2635478 14587 9652
Match2 (spaces at the end):
14 2 55586
I tried this regex
^( )*[0-9]{1,7}(( )*[0-9]{1-7})*( )*$
It matches when the group is 8 digits.