Hello, I've been trying out the regex function in Quiz.Next and I'd like to know which flavor of regex it uses.
Solved! Go to Solution.
Quizzes.Next uses Ruby regular expressions (which are almost equivalent to PCRE)
Quizzes.Next uses Ruby regular expressions (which are almost equivalent to PCRE)
How would write a regex expression that would accept Vanadium(ii) or Vanadium (ii) and ignore case?
I tried
vanadium\(ii\)|vanadium.\(ii\) /i
Which works on the rubular tester, but not in canvas.
This regex should work for Vanadium(ii):
[ ]*[vV]anadium[ ]?\([iI][iI]\)
Allows for zero or more leading spaces, either lower or upper case "v", zero or one space between the "m" and the "(",
and the string must end with exactly two "i"s of any case between the parentheses. It should accept " vanadium (iI)" but not "Vanadium(I)".
- Dr. B