you can save source as string and options as uint
looks like uint8 is enough for options:
https://docs.ruby-lang.org/en/master/Regexp.html#method-i-options
and here is method to create reg exp by source and options:
https://docs.ruby-lang.org/en/master/Regexp.html#method-c-new
r = Regexp.new('foo') # => /foo/
r.source # => "foo"
r.options # => 0
Regexp.new('foo', 'i') # => /foo/i
Regexp.new('foo', 'im') # => /foo/im