Shopt toggles the values of variables controlling optional shell behavior. If you want to match a regular expression while ignoring the case, the easiest method is to use shopt. You can use shopt set, unset, and print out settable options such as the ability to expand aliases and debugging options.
You can use regular expressions in python by using the “re” module. Both patterns and strings to be searched can be Unicode strings as well as 8-bit strings. Most of the regex module functions don’t force you to compile a regex object first, which I rarely do. You can easily use regular expressions by placing them inside python’s raw string notation using apostrophes.