Welcome, Guest
Username: Password: Remember me

TOPIC: Group relevance expression: wrong evaluation?

Group relevance expression: wrong evaluation? 4 months 3 days ago #109319

  • abaldoni
  • abaldoni's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
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 administrator has disabled public write access.

Group relevance expression: wrong evaluation? 4 months 3 days ago #109321

  • abaldoni
  • abaldoni's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
So, it turns out that one of the regexs was wrong... :ohmy:

Sorry for bothering you,
Alessandro
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.125 seconds
Donation Image