# File lib/bson/types/regex.rb, line 93
    def try_compile
      regexp_opts = 0
      regexp_opts |= Regexp::IGNORECASE if (options & IGNORECASE != 0)
      regexp_opts |= Regexp::MULTILINE  if (options & DOTALL != 0)
      regexp_opts |= Regexp::EXTENDED   if (options & EXTENDED != 0)
      Regexp.new(pattern, regexp_opts)
    end