RegEx /i (uppercase or lowercase) use in LimeSurvey

More
3 years 1 week ago #109015 by stevelegare
stevelegare created the topic: RegEx /i (uppercase or lowercase) use in LimeSurvey
Hi all,
Can someones tell me how to use /i in a regex to accept uppercase OR lowercase in input?
Regex in Limesurvey are delimited by "/"

thanks

Please Log in to join the conversation.

More
3 years 6 days ago #109125 by tpartner
tpartner replied the topic: RegEx /i (uppercase or lowercase) use in LimeSurvey
Where are you using this regex? Can you give an example?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 6 days ago #109130 by stevelegare
stevelegare replied the topic: RegEx /i (uppercase or lowercase) use in LimeSurvey
Hi,
I'm using the RegEx in a text input field (validation param) to validate a specific domain name.
I use this regex
/^(.+)(domain.ca)$/
. I would like to use the /i to accept upper or lower input.
Thanks

Please Log in to join the conversation.

More
3 years 6 days ago #109142 by tpartner
tpartner replied the topic: RegEx /i (uppercase or lowercase) use in LimeSurvey
Hmm...that does seem to be a bit of a bug.

You may have to to it the hard way:

regexMatch('/^(.+)([dD][oO][mM][aA][iI][nN].[cC][aA])$/', this)


.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 days ago #109290 by stevelegare
stevelegare replied the topic: RegEx /i (uppercase or lowercase) use in LimeSurvey
Thanks for the example

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now