class Regex

Superclass hierarchy

Object
Reference
Regex

Defined in:

Class Method Summary

Instance Method Summary

Class Method Detail

def self.error?(source)

Determines Regex's source validity. If it is, nil is returned. If it's not, a String containing the error message is returned.

Regex.error("(foo|bar)") #=> nil
Regex.error("(foo|bar") #=> "missing ) at 8"

def self.escape(str)

def self.new(source, options = Options::None : Options)

Instance Method Detail

def ==(other : Regex)

def ===(other : String)

def =~(other : String)

def =~(other)

def inspect(io : IO)

def match(str, pos = 0, options = Regex::Options::None)

def match_at_byte_index(str, byte_index = 0, options = Regex::Options::None)

def name_table

def options

def source

def to_s(io : IO)