WeBWorK Problems

Regex works in problem, but not in macro

Re: Regex works in problem, but not in macro

by Nathan Warkentin -
Number of replies: 0
Thank you for the efficient and quick reply, Alex! After making these changes, everything works as expected. I was also able to fix several other regular expressions before errors arose.

For anyone in a similar position reading this post, the corrected regex just uses regular Perl regex syntax:

/\((?:[^)(]+|(?R))*+\)/g

So anytime you want to put a regex in a macro, simply revert to using backlashes as you normally would.