I'd like to extract part of the string from the answer.
For instance, if "XXX - Y99" is the answer, I'd like to extract the second part ("Y99") and validate if it is equal to TOKEN:ATTRIBUTE_2.
Is something like that feasible?
Regular expression in itself is not a problem (in my case even something like '/Y.*/' would work), but I don't know how to extract it from the answer (e.g. from {q1.shown}).
Any ideas?
P.S. For some reason I cannot use Javascript so this is not an option.
So this seems to be a closed question, if you want to compare it to q1.shown, right? So you actually already know what is written in this specific answer, right?
XXX are placeholders or would this really be XXX and are all answers structured the same?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Indeed, it is a multiple choice question with pre-defined answers like XXX - Y99, DDD - Y10, EEE - Y88,...
These are all placeholders of course, but the structure is similar.
However due to the fact that in TOKEN:ATTRIBUTE_n I only have strings like ("Y99", "Y10", "Y88"), I cannot do a direct comparison in the sense of {q1.shown} == TOKEN:ATTRIBUTE_n.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
The following user(s) said Thank You: gabrieljenik