Request for Regex Lookaround

Describe your feature request
For tests I am trying to make regex that looks around to make sure students are not just outputting the expected answer for the output and are doing the work.

Please add Regex lookarounds for tests.

What problem(s) would this feature solve?
This would allow teachers to look around the regex match and make sure none of the other test answers are in the output.

Explain what you were trying to do when you came across the problem leading to this feature request
I have two tests for a lab which is making a factorial function.
one test inputs 5 and expects 120 as the output.
The other inputs 9 and expects 362880 as the output.
Currently a student could just cin into nothing twice and then output both of the answers they can see from looking at the test, without actually writing the correct code.

I made a test using the lookaround regex:

120(?!\s+362880)

and it gave this error:

unable to compile regex expression: error parsing regexp: invalid or unsupported Perl syntax: (?!

Replit Profile: https://replit.com/@norasteele

1 Like