How to make a regular expression case insensitive? I am working on a Drupal Commerce shipping rule and it needs a regular expression to compare postcodes with the buyers address as below;

/^AB37|^AB38|^AB41/


I am finding this code to be case sensitive and I need it to be more relaxed allowing lowercase or mixed.

I have read I need a 'i' flag, but I am unsure how to apply this.

Could somebody please provide me with an example?
The case insensitive usually is adding a "i" char after the delimiter bar, something like this:
/^AB37|^AB38|^AB41/i

but depends of the case it can be changed. In JS, for example is adding a new param (var re = new RegExp(myVar,"ig")) or in php is preg_match("[expression]i", $text, $matches);