- need to check if a string is whole number between 1 and 99. so allow maximum 2 characters here.
OR
a fraction with a slash must be compulsorily 3 characters with slash at the 2nd character and the numerator[1-8] always smaller than the denominator[2-9] so minimum possible fraction being 1/2. so maximum possible fraction being 8/9. valid fractions include : 2/3, 5/8, 4/9 etc.
invalid fractions which cannot be included are 3/400 8/5 6/3 0/9
What would be the regex?
const req = /someregex/g;
also how does req.test(string) work?