Skip to main content
Nintex Community Menu Bar

How to use a case-insensitive modifier in a textbox regular expression?

  • February 27, 2018
  • 3 replies
  • 38 views

Forum|alt.badge.img+3

I'd like to use the case-insensitive modifier (/i) in the regular expression, under Validation, for a single line textbox in a form.

For example, if I were attempting to validate a URL that begins with http://...  I want to allow these variations:

http://

hTtP://

HTtp://

and so on.  I realize that I can accomplish this with brackets, as in [Hh][Tt][Tt][Pp]://, but it gets more cumbersome as the pattern match gets longer.

Adding the modifier to the end of the regex, like I would in Javascript, breaks it.  The only hits I have found while searching are about setting the Ignore Case switch in a regex action.

3 replies

Forum|alt.badge.img+14
  • Scholar
  • February 27, 2018

unfortunatelly that's not possible.

you'd need to write custom validation function and perform case insensitive regex check within custom javascript code.


Forum|alt.badge.img+3
  • Author
  • Rookie
  • February 27, 2018

Thank you, Marian.  I had a feeling this was the case.


Forum|alt.badge.img+14
  • Scholar
  • February 28, 2018

ahh, I've recalled possibility of use of inline modifiers.

try following

(?i)http://