Recompiles Regexp by parsing it and turning it back into a Regexp.
(In the future Regin will perform some Regexp optimizations such as removing unnecessary captures and options)
# File lib/regin.rb, line 70 def self.compile(source) regexp = Regexp.compile(source) expression = parse(regexp) Regexp.compile(expression.to_s(true), expression.flags) end
Parses Regexp and returns a Expression data structure.
# File lib/regin.rb, line 62 def self.parse(regexp) Parser.parse_regexp(regexp) end
Returns true if the interpreter is using the Oniguruma Regexp lib and supports named captures.
/(?<foo>bar)/
# File lib/regin.rb, line 22 def self.regexp_supports_named_captures? true end
Returns array of supported POSX bracket types
# File lib/regin.rb, line 41 def self.supported_posix_bracket_types @supported_posix_bracket_types ||= [] end