RegEx /i (uppercase or lowercase) use in LimeSurvey

More
2 years 10 months ago #109015 by stevelegare
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
2 years 10 months ago #109125 by tpartner
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
2 years 10 months ago #109130 by stevelegare
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
2 years 10 months ago #109142 by tpartner
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
2 years 10 months ago #109290 by stevelegare
Thanks for the example

Please Log in to join the conversation.