Skip to content
instance method

Regexp#inspect

() -> ::String
inspect → string

Returns a nicely-formatted string representation of self:

Example
/ab+c/ix.inspect # => "/ab+c/ix"

Related: Regexp#to_s.

See also #hash #match #fixed_encoding? #match? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0