From: Logan Capaldo Date: 2006-04-12T03:08:35+09:00 Subject: Re: regex flags On Apr 11, 2006, at 1:50 PM, Tom Allison wrote: > > Generically, how do you impliment the various flags? > > I figured out: s/ / /g --> gsub > and s/ / / -> sub > > What about something like > / /ixsmg > or various combinations thereof? > i and x are both there, in the same way, as well as m e.g. / /i / /x / /ix / /m The only reason /g doesn't really work is that ruby doesn't have a s/// operator (I guess it's an operator) and that modifier applies more to the substitution than the regexp itself.