From: james@... Date: 2002-06-04T11:41:47+09:00 Subject: RE: regexp#options in 1.7.2 > > |I wonder if Regexp#options should take an optional bit mask parameter. > |Then you could query for, or omit, particular bit sets: > > These optimize bits highly depend on the implementation of regex > engine. For example, we already have alternative regex engine > code-named "Oniguruma", which does not provide this bit. Still, options returns an integer; to get the low-order bits for the more stable values one needs to use some bit math: p ( re.options & Regexp::EXTENDED ).zero? # See if EXTENDED is set which is (perhaps marginally) easier/clearer like this: p ( re.options( Regexp::EXTENDED ).zero? # See if EXTENDED is set James > > matz. >