Regin

Constants

Version

Public Class Methods

compile(source) click to toggle source

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/rack/mount/vendor/regin/regin.rb, line 39
39:     def compile(source)
40:       regexp = Regexp.compile(source)
41:       expression = parse(regexp)
42:       Regexp.compile(expression.to_s(true), expression.flags)
43:     end
parse(regexp) click to toggle source

Parses Regexp and returns a Expression data structure.

    # File lib/rack/mount/vendor/regin/regin.rb, line 31
31:     def parse(regexp)
32:       Parser.parse_regexp(regexp)
33:     end
regexp_supports_named_captures?() click to toggle source

Returns true if the interpreter is using the Oniguruma Regexp lib and supports named captures.

  /(?<foo>bar)/
    # File lib/rack/mount/vendor/regin/regin.rb, line 21
21:       def regexp_supports_named_captures?
22:         true
23:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.