Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Group relevance expression: wrong evaluation?

  • abaldoni
  • abaldoni's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #109319 by abaldoni
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
The topic has been locked.
  • abaldoni
  • abaldoni's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #109321 by abaldoni
Replied by abaldoni on topic Group relevance expression: wrong evaluation?
So, it turns out that one of the regexs was wrong... :ohmy:

Sorry for bothering you,
Alessandro
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose