Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Multiple short text regex validation - by: jelo

$
0
0
Expression flags (Parameter after the last /) are often a source of trouble in LimeSurvey.

The Expression manager is fine with
regexMatch('/([A-Z]{1}\d{1,2})/', Q1_1)
but marks a faulty regex when using your valid term:
regexMatch('/([A-Z]{1}\d{1,2})/g', Q1_1)

We had some issues with /i in this thread.
www.limesurvey.org/forum/can-i-do-this-w...nce-equations#149434
The last status was that the fix was working. But is was about the on-page javascript regex validation.


The /g flag might be not supported by the used php function.
PHP has a special function preg-match-all for global regex.
php.net/manual/en/function.preg-match-all.php

The g flag is causing the error.



Might be the preg-match-all function.
php.net/manual/en/function.preg-match-all.php

Perhaps it is a worth a bugreport. Perhaps I have overlooked something. Let's see what others are thinking.

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>