I want to create a regex that does the following
<\numberMAX8>[space or not]<\symbol(-)>[space or not]<\numberMAX8> and max 10 times of all of this - I don't care about end spaces, also numbers must be between 5-8.
To explain it a bit more I'll give a few examples
ex:
5-6 7-6 8-8 6-7 ok
4-7 not ok //because of 4
7 - 6 ok
7-6-6-6 not ok because of the
-in the middle
Below is what I have so far without having included the mid spaces.
^([5-8](?:-|\s)[5-8][\s]){1,10}
-> <-//didnt work.
^[5-8] ?- ?[5-8](?: [5-8] ?- ?[5-8]){0,9} *$^(?:[5-8]{0,8}\s*-\s*[5-8]{0,8}\s*){0,10}$^([5-8]\s*-\s*[5-8]\s*){1,10}$.^([5-8]\s*-\s*[5-8]\s*){1,10}$