Regex Parsons: Using Horizontal Parsons Problems to Scaffold Learning Regex
Zihan Wu, Barbara Jane Ericson, Christopher A. Brooks · 2021
Regular expressions (regex) are a popular text processing method used in programming. They are widely used in data analysis, web scraping, and input validation, and are supported by all mainstream programming languages. However, both students and even professional programmers perceive writing regex as difficult. Meanwhile, Parsons problems are a type of code completion problem used for introductory level programming education, and they can be a more efficient way to practice programming. Since regex is also a formal language, we created a horizontal version of Parsons problems to support teaching regex. We present results from an evaluation study in a MOOC comparing solving Parsons regex problems versus traditional regex problems. A higher percentage of students in the Parsons condition completed the practice and posttest. There was no significant difference in the learning gain from pretest to posttest between the conditions.