Now, of course, I could write my regular expression to handle both cases, such as regexp.Compile(\"[a-zA-Z]\"), but my regular expression is constructed from a
Use the i flag. Quoting the tip documentation:
Grouping:
(re) numbered capturing group
(?Pre) named & numbered capturing group
(?:re) non-capturing group
(?flags) set flags within current group; non-capturing
(?flags:re) set flags during re; non-capturing
Flag syntax is xyz (set) or -xyz (clear) or xy-z (set xy, clear z). The flags are:
i case-insensitive (default false)
m multi-line mode: ^ and $ match begin/end line in addition to begin/end text (default false)
s let . match \n (default false)
U ungreedy: swap meaning of x* and x*?, x+ and x+?, etc (default false)