- Posts: 112
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
RegEx /i (uppercase or lowercase) use in LimeSurvey
- stevelegare
- Topic Author
- Offline
- Premium Member
Less
More
9 years 11 months ago #109015
by stevelegare
RegEx /i (uppercase or lowercase) use in LimeSurvey was created 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
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 topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
9 years 11 months ago #109125
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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.
The topic has been locked.
- stevelegare
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 112
- Thank you received: 0
9 years 11 months ago #109130
by stevelegare
Replied by stevelegare on 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
. I would like to use the /i to accept upper or lower input.
Thanks
I'm using the RegEx in a text input field (validation param) to validate a specific domain name.
I use this regex
Code:
/^(.+)(domain.ca)$/
Thanks
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
9 years 11 months ago #109142
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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:
.
You may have to to it the hard way:
Code:
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.
The topic has been locked.
- stevelegare
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 112
- Thank you received: 0
9 years 10 months ago #109290
by stevelegare
Replied by stevelegare on topic RegEx /i (uppercase or lowercase) use in LimeSurvey
Thanks for the example
The topic has been locked.