Regex case insensitive

My understanding is that you can’t append /i to the end of a regex to make it case insensitive.

I have therefore resorted to creating my own regex of e.g. @((p|P)(r|R)(e|E)(s|S)(s|S)(p|P)(l|L)(u|U)(g|G)(s|S))

But this is obviously an ugly solution and not scalable atm as i am writing them manually, is there anyway round this? Adding /i would make it so elegant but it’s just out of reach!

This topic was automatically closed after 70 days. New replies are no longer allowed.