Python 2.6 Support

Python 2.6 Regex doesn't have the `flags` argument, so I replaced the use of `flags=` with inline flags.