rxp.to_s â str
Instance Public methods
Returns a string containing the regular expression and its options (using
the (?opts:source) notation. This string can be fed back in to
Regexp::new to a regular expression with the same semantics as
the original. (However, Regexp#== may not return true when
comparing the two, as the source of the regular expression itself may
differ, as the example shows). Regexp#inspect produces a
generally more readable version of rxp.
r1 = /ab+c/ix