The test only checks to see if the length constraint has been provided at the start and end of the regex string but it is possible for the length constraint to be present anywhere in the string.
Additionally the current test only returns success if length constraint of the pattern {m,n} or {m,} is provided while there is a third valid option {m} which will return failure.
Updated Code
Since we only need to check if length constraint has been provided somewhere in the input regex string there is no need to check the start and end of the string separately instead a search of the entire string should be sufficient.
Added support for the {m} variant of length constraint which was not currently supported.
Updated the Units Tests with additional test conditions to check a more broader range of possible inputs.
fixes #731
Current Code
{m,n}
or{m,}
is provided while there is a third valid option{m}
which will return failure.Updated Code
{m}
variant of length constraint which was not currently supported.Additional test cases that where validated can be found here: https://regex101.com/r/fde0fy/3