More fix at regex lessons

Fix for issues found when reviewing #722.

@danmaclean and @gvwilson, can you please check?