Regular Expressions 101

Community Patterns

Canvas user quiz url to API url

0

Regular Expression
Python

r"
(https?://.*?)(/courses/(?:\d+)/quizzes/(?:\d+))/?(?:take)?
"
gm

Description

Turns a URL provided by the user (copied from the address bar) into a url to access the same quiz with the Canvas LMS REST API.

Submitted by anonymous - 2 years ago