Preg 2.8 BETA

Preg 2.8 BETA

by Oleg Sychev -
Number of replies: 0
Picture of Core developers Picture of Plugin developers

You can download BETA version of Preg question type for Moodle 2.8 using this link. Please test it and write about any problems you experience in this thread or on the https://code.google.com/p/oasychev-moodle-plugins/issues/list using Component-Preg.

For those patiently enought to wait for Preg question type for Moodle 2.8 release - BETA version is out. I know, it is long overdue - but we needed a long stop on the road to make new functionality stable - and I have some pretty good news for you there.

New features:

  • a new mode for Full, 100% correct support for simple assertions - you can even generate hints for regexes like  [a!]\b[b?]\b[c.]\b[d!]\be   or  [a!]\b[b?]\b[c.]\b[d!]\b\? and get correct hinting results in any place. This makes regex matching roughly two times slower, so you have an admin option to retain old, Fast mode in case you will experience performance problems. Thanks go to the Elena Lepilkina and Valeriy Streltsov.
  • support for subexpressions recursion operator in FA matcher - you can get hints for regexes defining a strings with arbitrary correctly nested parenthesis for now - Valeriy Streltsov
  • subexpression recursion can make you regexes rather complex and unreadable, so there goes a convenient templates function - you can use several predefined templates to make you regexes easier, for example (?###parens_opt<)a\+b(?###>) will match with a+b inside any number of correctly closed parenthesis or without them - e.g. a+b  ((a+b)) (((((((((a+b))))))))) etc - full list of templates can be found on https://docs.moodle.org/28/en/Preg_question_type#Templates - Oleg Sychev, Valeriy Streltsov, Grigory Terekhov and Vladimir Ivanov all worked on this.
  • if you will write a regex that can not match at all (it can be done using simple assertions), it will be detected and shown as error on saving question - Elena Lepilkina and Valeriy Streltsov
  • conditional subpatterns are now supported in FA matcher - allowing you to write regexes with conditined alternatives  - and you can get hints for them - Valeriy Streltsov
Please test these features and let us know if you experience any problems or inconvenience, helping us to make stable release.
Average of ratings: -