Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Regexp#casefold?

rxp.casefold? → true or false

Returns the value of the case-insensitive flag.

Example
/a/.casefold?           #=> false
/a/i.casefold?          #=> true
/(?i:a)/.casefold?      #=> false
See also #as_json #encoding #~ #eql? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1