Group relevance expression: wrong evaluation?

More
3 years 4 months ago #109319 by abaldoni
abaldoni created the topic: Group relevance expression: wrong evaluation?
Hi,
I'm trying to hide a group of questions according the following expression:

regexMatch("/^(db_)[a-z0-9]{12}$/", TOKEN:TOKEN) || regexMatch("/^(am_)[a-z0-9]{12}$/", TOKEN:TOKEN) || (regexMatch("/^(di_)[a-z0-9]{12}$/", TOKEN:TOKEN) && (TOKEN:LASTNAME != 'FooBar'))

All tokens start with two letters and an underscore; users with a token beginning with di_ should skip the question group associated with their name.

It looks like the last part of the expression always evaluates to false, even with the parenthesis in place.
Any suggestion?

Regards,
Alessandro

Please Log in to join the conversation.

More
3 years 4 months ago #109321 by abaldoni
abaldoni replied the topic: Group relevance expression: wrong evaluation?
So, it turns out that one of the regexs was wrong... :ohmy:

Sorry for bothering you,
Alessandro

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now