Welcome, Guest
Username: Password: Remember me

TOPIC: RegEx /i (uppercase or lowercase) use in LimeSurvey

RegEx /i (uppercase or lowercase) use in LimeSurvey 4 months 4 weeks ago #109015

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
The administrator has disabled public write access.

RegEx /i (uppercase or lowercase) use in LimeSurvey 4 months 3 weeks ago #109125

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4263
  • Thank you received: 801
  • Karma: 367
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

RegEx /i (uppercase or lowercase) use in LimeSurvey 4 months 3 weeks ago #109130

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
The administrator has disabled public write access.

RegEx /i (uppercase or lowercase) use in LimeSurvey 4 months 3 weeks ago #109142

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4263
  • Thank you received: 801
  • Karma: 367
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

RegEx /i (uppercase or lowercase) use in LimeSurvey 4 months 3 weeks ago #109290

Thanks for the example
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.207 seconds
Donation Image