cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

What flavor of regular expression (regex) does Quiz.Next use?

Jump to solution

Hello, I've been trying out the regex function in Quiz.Next and I'd like to know which flavor of regex it uses.

1 Solution

Accepted Solutions
Instructure
Instructure

Quizzes.Next uses Ruby regular expressions (which are almost equivalent to PCRE)

View solution in original post

3 Replies
Instructure
Instructure

Quizzes.Next uses Ruby regular expressions (which are almost equivalent to PCRE)

View solution in original post

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